﻿
.av-confirm-dialog.mud-dialog {

 background: var(--color-white) !important;
 color: var(--color-gray-700) !important;
 border-radius: var(--radius-lg) !important;
 box-shadow: 0 10px 40px -8px rgb(from var(--color-gray-900) r g b / 0.18),
 0 4px 16px -4px rgb(from var(--color-gray-900) r g b / 0.12) !important;
 width: 100%;
 max-width: 28rem;
 overflow: hidden;
}

html.dark .av-confirm-dialog.mud-dialog {
 background: var(--color-dark-700) !important;
 color: var(--color-dark-100) !important;
 box-shadow: 0 10px 40px -8px rgb(0 0 0 / 0.55),
 0 4px 16px -4px rgb(0 0 0 / 0.4) !important;
}

.av-confirm-dialog .mud-dialog-content {
 padding: 0 !important;
}

.av-confirm-dialog .mud-dialog-title,
.av-confirm-dialog .mud-dialog-actions {
 display: none !important;
}

.av-confirm-dialog__panel {
 display: flex;
 flex-direction: column;
 align-items: center;
 text-align: center;
 padding: 24px 16px;
}

@media (min-width: 640px) {
 .av-confirm-dialog__panel {
 padding: 24px 20px;
 }
}

.av-confirm-dialog__icon {
 flex-shrink: 0;
 width: 96px;
 height: 96px;
 line-height: 0;
 margin: 0 auto;
}

.av-confirm-dialog__icon svg {
 width: 96px !important;
 height: 96px !important;
 }

.av-confirm-dialog__panel[data-state="pending"] .av-confirm-dialog__icon { color: var(--color-warning) !important; }
.av-confirm-dialog__panel[data-state="error"] .av-confirm-dialog__icon { color: var(--color-error) !important; }
.av-confirm-dialog__panel[data-state="success"] .av-confirm-dialog__icon { color: var(--color-success) !important; }

.av-confirm-dialog__title {
 margin: 16px 0 0 0;
 font-size: 1.25rem;
 font-weight: 500;
 line-height: 1.4;
 color: var(--color-gray-800);
}

html.dark .av-confirm-dialog__title { color: var(--color-dark-100); }

.av-confirm-dialog__description {
 margin: 8px auto 0 auto;
 max-width: 20rem;
 font-size: 0.875rem;
 line-height: 1.5;
 color: var(--color-gray-600);
}

html.dark .av-confirm-dialog__description { color: var(--color-dark-200); }

.av-confirm-dialog__actions {
 display: flex;
 justify-content: center;
 gap: 12px;
 margin-top: 48px;
}

.av-confirm-dialog .av-confirm-dialog__btn-cancel.mud-button-root,
.av-confirm-dialog .av-confirm-dialog__btn-action.mud-button-root {
 height: 36px;
 min-width: 7rem;
 padding: 0 16px;
 border-radius: var(--radius-md);
 font-weight: 500;
 text-transform: none;
}

.av-confirm-dialog .av-confirm-dialog__btn-cancel {
 background: transparent;
 border: 1px solid var(--color-gray-300);
 color: var(--color-gray-700);
}

 .av-confirm-dialog .av-confirm-dialog__btn-cancel:hover {
 background: var(--color-gray-100);
 border-color: var(--color-gray-400);
 }

html.dark .av-confirm-dialog .av-confirm-dialog__btn-cancel {
 border-color: var(--color-dark-400);
 color: var(--color-dark-100);
}

 html.dark .av-confirm-dialog .av-confirm-dialog__btn-cancel:hover {
 background: var(--color-dark-600);
 }

.av-confirm-dialog__panel[data-state="pending"] .av-confirm-dialog__btn-action {
 background: var(--color-primary-600) !important;
 color: var(--color-white) !important;
 border: 1px solid var(--color-primary-600) !important;
}

 .av-confirm-dialog__panel[data-state="pending"] .av-confirm-dialog__btn-action:hover {
 background: var(--color-primary-700) !important;
 border-color: var(--color-primary-700) !important;
 }

.av-confirm-dialog__panel[data-state="error"] .av-confirm-dialog__btn-action {
 background: var(--color-error) !important;
 color: var(--color-white) !important;
 border: 1px solid var(--color-error) !important;
}

 .av-confirm-dialog__panel[data-state="error"] .av-confirm-dialog__btn-action:hover {
 background: var(--color-error-darker) !important;
 border-color: var(--color-error-darker) !important;
 }

.av-confirm-dialog__panel[data-state="success"] .av-confirm-dialog__btn-action {
 background: var(--color-success) !important;
 color: var(--color-white) !important;
 border: 1px solid var(--color-success) !important;
}

 .av-confirm-dialog__panel[data-state="success"] .av-confirm-dialog__btn-action:hover {
 background: var(--color-success-darker) !important;
 border-color: var(--color-success-darker) !important;
 }

.av-confirm-dialog .av-confirm-dialog__spinner {
 width: 16px;
 height: 16px;
 margin-right: 8px;
}

.av-confirm-dialog .mud-button-root.mud-button-disabled,
.av-confirm-dialog .mud-button-root[disabled] {
 opacity: 0.7;
 pointer-events: none;
}

@keyframes av-confirm-tick-checkmark {
 0% { stroke-dashoffset: 100px; }
 100% { stroke-dashoffset: 0; }
}

@keyframes av-confirm-tick-circle {
 0% { stroke-dashoffset: 480px; }
 100% { stroke-dashoffset: 960px; }
}

.av-confirm-tick {
 width: 96px;
 height: 96px;
 stroke: currentColor;
 fill: none;
}

 .av-confirm-tick .av-confirm-tick__circle {
 stroke-dasharray: 480px, 480px;
 stroke-dashoffset: 960px;
 animation: av-confirm-tick-circle 0.6s ease-in-out backwards;
 }

 .av-confirm-tick .av-confirm-tick__check {
 stroke-dasharray: 100px, 100px;
 stroke-dashoffset: 200px;
 animation: av-confirm-tick-checkmark 0.25s ease-in 0.6s backwards;
 }

.mud-button-root:not(.mud-icon-button):not(.mud-fab) {
 border-radius: var(--radius-lg) !important;
 }

.av-form-dialog.mud-dialog {
 display: flex;
 flex-direction: column;

 background: var(--color-white) !important;
 color: var(--color-gray-700) !important;
 border-radius: var(--radius-lg) !important;
 box-shadow: 0 10px 40px -8px rgb(from var(--color-gray-900) r g b / 0.18),
 0 4px 16px -4px rgb(from var(--color-gray-900) r g b / 0.12) !important;
 width: 100%;
 max-width: 32rem;

 max-height: 90vh !important;
 overflow: hidden;
}

html.dark .av-form-dialog.mud-dialog {
 background: var(--color-dark-700) !important;
 color: var(--color-dark-100) !important;
 box-shadow: 0 10px 40px -8px rgb(0 0 0 / 0.55),
 0 4px 16px -4px rgb(0 0 0 / 0.4) !important;
}

.av-form-dialog--size-small.mud-dialog { max-width: 24rem; }
.av-form-dialog--size-medium.mud-dialog { max-width: 32rem; }
.av-form-dialog--size-large.mud-dialog { max-width: 40rem; }
.av-form-dialog--size-xl.mud-dialog { max-width: 48rem; }

@media (max-width: 480px) {
 .av-form-dialog.mud-dialog {
 max-width: calc(100% - 16px) !important;
 max-height: 95vh;
 }
}

.av-form-dialog .mud-dialog-title {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 12px;
 padding: 12px 16px !important;
 background: var(--color-gray-200) !important;
 flex: 0 0 auto;
}

@media (min-width: 640px) {
 .av-form-dialog .mud-dialog-title { padding: 12px 20px !important; }
}

html.dark .av-form-dialog .mud-dialog-title {
 background: var(--color-dark-800) !important;
}

.av-form-dialog__title {
 margin: 0;
 font-size: 1rem;
 font-weight: 500;
 line-height: 1.4;
 color: var(--color-gray-800);

 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
 min-width: 0;
}

html.dark .av-form-dialog__title {
 color: var(--color-dark-100);
}

.av-form-dialog .mud-dialog-title .mud-icon-button:not(.av-form-dialog__close) {
 display: none !important;
}

.av-form-dialog .av-form-dialog__close.mud-icon-button {
 width: 28px;
 min-width: 28px;
 height: 28px;
 flex-shrink: 0;
 margin-right: -6px;
 padding: 0;
 border: 0;
 border-radius: 50% !important;
 background: transparent !important;
 color: var(--color-gray-700);
 transition: background-color 120ms ease;
}

 .av-form-dialog .av-form-dialog__close.mud-icon-button:hover {
 background: rgb(from var(--color-gray-900) r g b / 0.06) !important;
 }

.av-form-dialog__close.mud-icon-button .mud-icon-root {
 width: 18px !important;
 height: 18px !important;
 font-size: 18px !important;
 fill: none !important;
 stroke: currentColor;
 }

html.dark .av-form-dialog .av-form-dialog__close.mud-icon-button {
 color: var(--color-dark-200);
}

 html.dark .av-form-dialog .av-form-dialog__close.mud-icon-button:hover {
 background: rgb(from var(--color-white) r g b / 0.06) !important;
 }

.av-form-dialog .mud-dialog-content {
 flex: 1 1 auto;
 min-height: 0;
 /* Cap explícito a la altura disponible dentro del 90vh del dialog:
    90vh menos chrome (header ~50px + footer ~70px = 120px). Asegura que
    el body scrollea internamente aunque alguna primitiva interna pelee el
    flex sizing. */
 max-height: calc(90vh - 120px) !important;
 overflow-y: auto !important;
 padding: 16px !important;
}

/* Opt-in modifier for form dialogs whose content is short and shouldn't
   reserve a scrollbar. The Mud focus-trap wrappers between .mud-dialog and
   .mud-dialog-content break the flex column chain — we re-establish flex
   through them with `flex: 0 1 auto` so the content area sizes to its
   intrinsic height instead of filling the dialog's max-height (which is
   what surfaces the scrollbar gutter on Windows). Apply by adding
   `av-form-dialog--auto-height` alongside `av-form-dialog` on the
   MudDialog Class attribute. */
.mud-dialog.av-form-dialog.av-form-dialog--auto-height .mud-focus-trap,
.mud-dialog.av-form-dialog.av-form-dialog--auto-height .mud-focus-trap-child-container {
 display: flex !important;
 flex-direction: column !important;
 flex: 0 1 auto !important;
 min-height: 0 !important;
 min-width: 0 !important;
 width: 100% !important;
}

/* `overflow: visible` (shorthand) here is intentional — MudBlazor's
   bundled CSS uses `.mud-dialog .mud-dialog-content { overflow: auto }`
   (also shorthand), so to override both axes cleanly we use the same
   shorthand. The `.mud-dialog` prefix raises specificity to 0,4,0 so
   we beat Mud's `.mud-dialog .mud-dialog-content` (0,2,0). */
.mud-dialog.av-form-dialog.av-form-dialog--auto-height .mud-dialog-content {
 flex: 0 1 auto !important;
 overflow: visible !important;
}

@media (min-width: 640px) {
 .av-form-dialog .mud-dialog-content { padding: 20px !important; }
}

.av-form-dialog__description {
 color: var(--color-gray-600);
 font-size: var(--text-sm);
 line-height: var(--leading-normal);
}

html.dark .av-form-dialog__description {
 color: var(--color-dark-200);
}

.av-form-fields {
 display: flex;
 flex-direction: column;
 gap: 1.25rem;
 margin-top: 1rem;
}

.av-form-dialog .mud-dialog-actions {
 display: flex !important;
 flex-wrap: wrap;
 align-items: center;
 justify-content: flex-start !important;
 gap: 12px;
 padding: 12px 16px !important;

 background: var(--color-white);
 border-top: 1px solid var(--color-gray-100);
 flex: 0 0 auto;
}

@media (min-width: 640px) {
 .av-form-dialog .mud-dialog-actions { padding: 14px 20px !important; }
}

html.dark .av-form-dialog .mud-dialog-actions {
 background: var(--color-dark-700);
 border-top-color: var(--color-dark-600);
}

.av-form-dialog__hint {
 display: flex;
 align-items: center;
 gap: 8px;
 flex: 1 1 240px;
 min-width: 0;
 margin: 0;
 color: var(--color-gray-600);
 font-size: 0.8125rem;
 line-height: 1.4;
}

html.dark .av-form-dialog__hint {
 color: var(--color-dark-200);
}

.av-form-dialog__hint .mud-typography {
 margin: 0 !important;
 color: inherit !important;
 font-size: inherit !important;
 line-height: inherit !important;
}

.av-form-dialog__hint-icon.mud-icon-root {
 width: 16px !important;
 height: 16px !important;
 font-size: 16px !important;
 color: var(--color-yellow-500);
 flex-shrink: 0;
}

html.dark .av-form-dialog__hint-icon.mud-icon-root {
 color: var(--color-dark-300);
}

/* Adornment icons in form dialogs render at 18px so the visual weight matches
 the compact rhythm of the dialog. Without this, Heroicons paths fill the
 full 24×24 box and outweigh the surrounding controls. */
.av-form-dialog .mud-input-adornment .mud-icon-root,
.av-form-dialog .mud-input-adornment-icon {
 width: 18px !important;
 height: 18px !important;
 font-size: 18px !important;
}

.av-form-dialog__actions {
 display: flex;
 flex-wrap: wrap;
 justify-content: flex-end;
 gap: 12px;
 margin-left: auto;
}

.av-form-dialog .av-form-dialog__btn-cancel.mud-button-root,
.av-form-dialog .av-form-dialog__btn-action.mud-button-root {
 height: 36px;
 min-width: 7rem;
 padding: 0 18px;
 border-radius: 9999px !important;
 font-weight: 500;
 text-transform: none;
}

.av-form-dialog .av-form-dialog__btn-cancel {
 background: transparent;
 border: 1px solid var(--color-gray-300);
 color: var(--color-gray-700);
}

 .av-form-dialog .av-form-dialog__btn-cancel:hover {
 background: var(--color-gray-100);
 border-color: var(--color-gray-400);
 }

html.dark .av-form-dialog .av-form-dialog__btn-cancel {
 border-color: var(--color-dark-400);
 color: var(--color-dark-100);
}

 html.dark .av-form-dialog .av-form-dialog__btn-cancel:hover {
 background: var(--color-dark-600);
 }

.av-form-dialog .av-form-dialog__btn-action {
 background: var(--color-primary-600) !important;
 color: var(--color-white) !important;
 border: 1px solid var(--color-primary-600) !important;
}

 .av-form-dialog .av-form-dialog__btn-action:hover {
 background: var(--color-primary-700) !important;
 border-color: var(--color-primary-700) !important;
 }

.av-form-dialog .av-form-dialog__spinner {
 width: 16px;
 height: 16px;
 margin-right: 8px;
}

.av-form-dialog .mud-button-root.mud-button-disabled,
.av-form-dialog .mud-button-root[disabled] {
 opacity: 0.7;
 pointer-events: none;
}

.av-form-dialog .mud-input-control-helper-container {
 min-height: 0;
 padding-top: 0;
 padding-bottom: 0;
}

.av-form-dialog .mud-input-control-helper-container:not(:has(.mud-input-helper-text:not(:empty))) {
 display: none;
}

.av-color-picker__label {
 display: block;
 margin-bottom: 8px;
 font-size: 0.875rem;
 font-weight: 500;
 color: var(--color-gray-700);
}

html.dark .av-color-picker__label {
 color: var(--color-dark-100);
}

.av-color-picker {
 display: grid;
 grid-template-columns: repeat(10, minmax(0, 1fr));
 gap: 8px;
 margin-bottom: 12px;
}

@media (max-width: 480px) {
 .av-color-picker {
 grid-template-columns: repeat(5, minmax(0, 1fr));
 }
}

.av-color-swatch {
 width: 100%;
 aspect-ratio: 1 / 1;
 min-height: 32px;
 padding: 0;
 border: 2px solid transparent;
 border-radius: 8px;
 background: var(--color-gray-200);
 cursor: pointer;
 transition: transform 120ms ease, box-shadow 120ms ease;
}

 .av-color-swatch:hover {
 transform: scale(1.08);
 box-shadow: 0 4px 12px -2px rgb(from var(--color-gray-900) r g b / 0.18);
 }

 .av-color-swatch:focus-visible {
 outline: 2px solid var(--color-primary-500);
 outline-offset: 2px;
 }

.av-color-swatch--selected {
 border-color: var(--color-gray-900);
 transform: scale(1.08);
 box-shadow: 0 4px 12px -2px rgb(from var(--color-gray-900) r g b / 0.25);
}

html.dark .av-color-swatch--selected {
 border-color: var(--color-white);
}

.av-color-preview {
 display: inline-flex;
 align-items: center;
 gap: 8px;
 padding: 6px 10px;
 background: var(--color-gray-100);
 border-radius: 9999px;
 font-size: 0.8125rem;
 color: var(--color-gray-700);
}

html.dark .av-color-preview {
 background: var(--color-dark-700);
 color: var(--color-dark-100);
}

.av-color-preview__dot {
 width: 14px;
 height: 14px;
 border-radius: 50%;
 background: var(--color-gray-300);
 flex-shrink: 0;
}

.av-color-preview__name {
 font-weight: 500;
}

[data-color="Purple"] { background-color: var(--av-status-purple) !important; }
[data-color="Pink"] { background-color: var(--av-status-pink) !important; }
[data-color="Blue"] { background-color: var(--av-status-blue) !important; }
[data-color="Green"] { background-color: var(--av-status-green) !important; }
[data-color="Orange"] { background-color: var(--av-status-orange) !important; }
[data-color="Teal"] { background-color: var(--av-status-teal) !important; }
[data-color="Red"] { background-color: var(--av-status-red) !important; }
[data-color="Yellow"] { background-color: var(--av-status-yellow) !important; }
[data-color="Indigo"] { background-color: var(--av-status-indigo) !important; }
[data-color="Cyan"] { background-color: var(--av-status-cyan) !important; }

.av-icon-picker__label {
 display: block;
 margin-bottom: 8px;
 font-size: 0.875rem;
 font-weight: 500;
 color: var(--color-gray-700);
}

html.dark .av-icon-picker__label {
 color: var(--color-dark-100);
}

.av-icon-picker {
 display: grid;
 grid-template-columns: repeat(10, minmax(0, 1fr));
 gap: 8px;
 margin-bottom: 12px;
}

@media (max-width: 480px) {
 .av-icon-picker {
 grid-template-columns: repeat(5, minmax(0, 1fr));
 }
}

.av-icon-swatch {
 width: 100%;
 aspect-ratio: 1 / 1;
 min-height: 32px;
 padding: 0;
 border: 1px solid var(--color-gray-200);
 border-radius: 8px;
 background: var(--color-white);
 color: var(--color-gray-700);
 cursor: pointer;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 transition: transform 120ms ease, border-color 120ms ease, background-color 120ms ease;
}

 .av-icon-swatch:hover {
 background: var(--color-gray-100);
 border-color: var(--color-gray-300);
 transform: scale(1.05);
 }

 .av-icon-swatch:focus-visible {
 outline: 2px solid var(--color-primary-500);
 outline-offset: 2px;
 }

 .av-icon-swatch .mud-icon-root {
 width: 16px !important;
 height: 16px !important;
 font-size: 16px !important;
 color: inherit;
 }

.av-icon-swatch--selected {
 border-color: var(--color-primary-600);
 background: var(--color-primary-50);
 color: var(--color-primary-700);
}

html.dark .av-icon-swatch {
 background: var(--color-dark-600);
 border-color: var(--color-dark-500);
 color: var(--color-dark-100);
}

 html.dark .av-icon-swatch:hover {
 background: var(--color-dark-500);
 border-color: var(--color-dark-400);
 }

html.dark .av-icon-swatch--selected {
 border-color: var(--color-primary-500);
 background: rgb(from var(--color-primary-500) r g b / 0.2);
 color: var(--color-primary-300);
}

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

@media (max-width: 480px) {
 .av-form-row-2 {
 grid-template-columns: 1fr;
 }
}

.mud-picker-popover-paper,
.mud-picker .mud-paper {
 background: var(--color-white) !important;
 border-radius: var(--radius-lg) !important;
 box-shadow: 0 10px 40px -8px rgb(from var(--color-gray-900) r g b / 0.18),
 0 4px 16px -4px rgb(from var(--color-gray-900) r g b / 0.12) !important;
 border: 1px solid var(--color-gray-150) !important;
}

html.dark .mud-picker-popover-paper,
html.dark .mud-picker .mud-paper {
 background: var(--color-dark-700) !important;
 border-color: var(--color-dark-500) !important;
 box-shadow: 0 10px 40px -8px rgb(0 0 0 / 0.55),
 0 4px 16px -4px rgb(0 0 0 / 0.4) !important;
}

.mud-picker-toolbar {
 display: none !important;
}

.mud-picker-calendar-header {
 padding: 10px 12px !important;
 background: var(--color-gray-150) !important;
 color: var(--color-gray-600) !important;
 font-size: 110% !important;
 font-weight: var(--font-weight-medium) !important;
}

html.dark .mud-picker-calendar-header {
 background: var(--color-dark-600) !important;
 color: var(--color-dark-100) !important;
}

.mud-picker-calendar-header .mud-button-root {
 color: var(--color-gray-600) !important;
 background: transparent !important;
 }

 .mud-picker-calendar-header .mud-button-root:hover {
 color: var(--color-gray-800) !important;
 background: transparent !important;
 }

html.dark .mud-picker-calendar-header .mud-button-root {
 color: var(--color-dark-100) !important;
}

 html.dark .mud-picker-calendar-header .mud-button-root:hover {
 color: var(--color-dark-50) !important;
 }

.mud-picker-calendar-header .mud-icon-button {
 padding: 0 8px !important;
 background: transparent !important;
 color: var(--color-gray-500) !important;
 }

 .mud-picker-calendar-header .mud-icon-button .mud-icon-root {
 fill: currentColor !important;
 }

 .mud-picker-calendar-header .mud-icon-button:hover {
 background: transparent !important;
 color: var(--color-primary-600) !important;
 }

html.dark .mud-picker-calendar-header .mud-icon-button {
 color: var(--color-dark-200) !important;
}

 html.dark .mud-picker-calendar-header .mud-icon-button:hover {
 color: var(--color-primary-400) !important;
 }

.mud-picker-calendar-day-week-header,
.mud-picker-calendar-week-header,
.mud-picker-calendar-day-name,
.mud-day-of-week {
 background: var(--color-gray-150) !important;
 color: var(--color-gray-600) !important;
 font-size: var(--text-xs) !important;
 font-weight: var(--font-weight-medium) !important;
}

html.dark .mud-picker-calendar-day-week-header,
html.dark .mud-picker-calendar-week-header,
html.dark .mud-picker-calendar-day-name,
html.dark .mud-day-of-week {
 background: var(--color-dark-600) !important;
 color: var(--color-dark-100) !important;
}

.mud-picker-calendar-day {
 width: 36px !important;
 height: 32px !important;
 margin: 2px !important;
 padding: 0 !important;
 border-radius: var(--radius-lg) !important;
 font-size: var(--text-xs-plus) !important;
 font-weight: var(--font-weight-normal) !important;
 color: var(--color-gray-600) !important;
 background: transparent !important;
 border: 1px solid transparent !important;
 line-height: 2rem !important;
 transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}

html.dark .mud-picker-calendar-day {
 color: var(--color-dark-100) !important;
}

.mud-picker-calendar-day:hover:not(.mud-selected):not(.mud-disabled) {
 background: var(--color-gray-150) !important;
 color: var(--color-gray-800) !important;
}

html.dark .mud-picker-calendar-day:hover:not(.mud-selected):not(.mud-disabled) {
 background: var(--color-dark-500) !important;
 color: var(--color-dark-50) !important;
}

.mud-picker-calendar-day.mud-current,
.mud-current.mud-picker-calendar-day {
 border-color: var(--color-gray-200) !important;
 color: var(--color-gray-800) !important;
 font-weight: var(--font-weight-medium) !important;
}

html.dark .mud-picker-calendar-day.mud-current,
html.dark .mud-current.mud-picker-calendar-day {
 border-color: var(--color-dark-450) !important;
 color: var(--color-dark-50) !important;
}

.mud-picker-calendar-day.mud-selected,
.mud-selected.mud-picker-calendar-day {
 background: var(--color-primary-600) !important;
 color: var(--color-white) !important;
 border-color: var(--color-primary-600) !important;
 font-weight: var(--font-weight-medium) !important;
}

 .mud-picker-calendar-day.mud-selected:hover,
 .mud-selected.mud-picker-calendar-day:hover {
 background: var(--color-primary-700) !important;
 border-color: var(--color-primary-700) !important;
 color: var(--color-white) !important;
 }

html.dark .mud-picker-calendar-day.mud-selected,
html.dark .mud-selected.mud-picker-calendar-day {
 background: var(--color-primary-500) !important;
 border-color: var(--color-primary-500) !important;
}

 html.dark .mud-picker-calendar-day.mud-selected:hover,
 html.dark .mud-selected.mud-picker-calendar-day:hover {
 background: var(--color-primary-600) !important;
 border-color: var(--color-primary-600) !important;
 }

.mud-picker-calendar-day.mud-hidden,
.mud-picker-calendar-day-outside-month,
.mud-picker-calendar-day.mud-disabled {
 color: var(--color-gray-400) !important;
}

html.dark .mud-picker-calendar-day.mud-hidden,
html.dark .mud-picker-calendar-day-outside-month,
html.dark .mud-picker-calendar-day.mud-disabled {
 color: var(--color-dark-300) !important;
}

.mud-picker-calendar-day.mud-disabled {
 pointer-events: none;
 opacity: 0.5;
}

.mud-picker-year,
.mud-picker-month {
 color: var(--color-gray-700) !important;
 font-size: var(--text-sm) !important;
 border-radius: var(--radius-md) !important;
 transition: background-color 120ms ease, color 120ms ease;
}

 .mud-picker-year:hover,
 .mud-picker-month:hover {
 background: var(--color-gray-150) !important;
 }

.mud-picker-year.mud-picker-year-selected,
.mud-picker-month.mud-picker-month-selected {
 color: var(--color-primary-600) !important;
 font-weight: var(--font-weight-medium) !important;
}

html.dark .mud-picker-year,
html.dark .mud-picker-month {
 color: var(--color-dark-100) !important;
}

 html.dark .mud-picker-year:hover,
 html.dark .mud-picker-month:hover {
 background: var(--color-dark-500) !important;
 }

html.dark .mud-picker-year.mud-picker-year-selected,
html.dark .mud-picker-month.mud-picker-month-selected {
 color: var(--color-primary-400) !important;
}

.mud-time-picker .mud-time-picker-clock-hand,
.mud-time-picker .mud-time-picker-hour.mud-active,
.mud-time-picker .mud-time-picker-minute.mud-active {
 background: var(--color-primary-600) !important;
 color: var(--color-white) !important;
}

html.dark .mud-time-picker .mud-time-picker-clock-hand,
html.dark .mud-time-picker .mud-time-picker-hour.mud-active,
html.dark .mud-time-picker .mud-time-picker-minute.mud-active {
 background: var(--color-primary-500) !important;
}

.mud-input.mud-input-outlined:not(:focus-within):not(.mud-input-error) .mud-input-outlined-border {
 border-width: 1px !important;
 border-color: var(--color-gray-300) !important;
 border-radius: var(--radius-lg) !important;
 transition: border-color 120ms ease;
}

html.dark .mud-input.mud-input-outlined:not(:focus-within):not(.mud-input-error) .mud-input-outlined-border {
 border-color: var(--color-dark-400) !important;
}

.mud-input.mud-input-outlined:hover:not(.mud-disabled):not(:focus-within):not(.mud-input-error) .mud-input-outlined-border {
 border-color: var(--color-gray-400) !important;
}

html.dark .mud-input.mud-input-outlined:hover:not(.mud-disabled):not(:focus-within):not(.mud-input-error) .mud-input-outlined-border {
 border-color: var(--color-dark-300) !important;
}

.mud-input.mud-input-outlined:focus-within .mud-input-outlined-border {
 border-width: 1px !important;
}

.mud-input.mud-input-outlined.mud-input-error .mud-input-outlined-border {
 border-width: 1px !important;
}

/* Error state — border rojo cuando .mud-input-error está en el contenedor padre
 .mud-input-control (caso MudSelect / MudAutocomplete — la clase NO va sobre
 .mud-input mismo) o en .mud-input directo (caso MudTextField). El idle rule
 §886 usa :not(.mud-input-error) que solo chequea el elemento mismo, así que
 ganaba (0,5,0) sobre las reglas del bridge (0,4,0) cuando la clase iba en
 el padre. Specificity 0,5,0 igual al idle + source order posterior → gana. */
.mud-input-control.mud-input-error .mud-input.mud-input-outlined .mud-input-outlined-border,
.mud-form-control.mud-input-error .mud-input.mud-input-outlined .mud-input-outlined-border {
 border-color: var(--color-error) !important;
}
html.dark .mud-input-control.mud-input-error .mud-input.mud-input-outlined .mud-input-outlined-border,
html.dark .mud-form-control.mud-input-error .mud-input.mud-input-outlined .mud-input-outlined-border {
 border-color: var(--color-error-lighter) !important;
}

.mud-checkbox,
.mud-radio {
 display: inline-flex !important;
 align-items: center !important;
 gap: calc(var(--spacing) * 2) !important;
}

/* Spacing between consecutive MudRadios inside a MudRadioGroup. Mud's default
 doesn't gap them, so text from one ends right where the next radio begins.
 Use flex + gap so it adapts to both row and column layouts. */
.mud-radio-group {
 display: inline-flex;
 flex-wrap: wrap;
 column-gap: 16px;
 row-gap: 6px;
 align-items: center;
}

.mud-checkbox > .mud-typography,
.mud-radio > .mud-typography {
 margin: 0 !important;
}

.mud-checkbox .mud-icon-root,
.mud-radio .mud-icon-root {
 visibility: hidden !important;
}

.mud-checkbox .mud-icon-button,
.mud-radio .mud-icon-button {
 position: relative !important;
 box-sizing: border-box !important;
 padding: 0 !important;
 width: calc(var(--spacing) * 4.5) !important;
 height: calc(var(--spacing) * 4.5) !important;
 min-width: 0 !important;
 min-height: 0 !important;
 border-style: solid !important;
 border-width: 1px !important;
 border-color: rgb(from var(--color-gray-400) r g b / 0.7) !important;
 background-color: transparent !important;
 transition: background-color 150ms ease, border-color 150ms ease;
}

.mud-checkbox .mud-icon-button {
 border-radius: var(--radius-sm) !important;
}

.mud-radio .mud-icon-button {
 border-radius: 50% !important;
}

html.dark .mud-checkbox .mud-icon-button,
html.dark .mud-radio .mud-icon-button {
 border-color: var(--color-dark-400) !important;
}

.mud-checkbox .mud-ripple,
.mud-checkbox .mud-ripple-checkbox,
.mud-radio .mud-ripple,
.mud-radio .mud-ripple-radio {
 background-color: transparent !important;
 box-shadow: none !important;
}

/* Hover / focus on an idle checkbox/radio: tint the border without filling.
   The `:not(...mud-checkbox-null)` guards prevent this from firing on a
   tri-state checkbox in the `null` (indeterminate) state. The class lands
   on either the wrapper `.mud-checkbox` itself OR the inner `.mud-icon-button`
   depending on the MudBlazor minor version — guarding both. */
.mud-checkbox:not(.mud-checkbox-null):not(:has(input:checked)):not(:has(input:indeterminate)):not(:has(.mud-icon-button.mud-checkbox-null)):not(.mud-disabled):hover .mud-icon-button,
.mud-checkbox:not(.mud-checkbox-null):not(:has(input:checked)):not(:has(input:indeterminate)):not(:has(.mud-icon-button.mud-checkbox-null)):not(.mud-disabled):focus-within .mud-icon-button,
.mud-radio:not(:has(input:checked)):not(.mud-disabled):hover .mud-icon-button,
.mud-radio:not(:has(input:checked)):not(.mud-disabled):focus-within .mud-icon-button {
 border-color: var(--color-primary-600) !important;
 background-color: transparent !important;
}

html.dark .mud-checkbox:not(.mud-checkbox-null):not(:has(input:checked)):not(:has(input:indeterminate)):not(:has(.mud-icon-button.mud-checkbox-null)):not(.mud-disabled):hover .mud-icon-button,
html.dark .mud-checkbox:not(.mud-checkbox-null):not(:has(input:checked)):not(:has(input:indeterminate)):not(:has(.mud-icon-button.mud-checkbox-null)):not(.mud-disabled):focus-within .mud-icon-button,
html.dark .mud-radio:not(:has(input:checked)):not(.mud-disabled):hover .mud-icon-button,
html.dark .mud-radio:not(:has(input:checked)):not(.mud-disabled):focus-within .mud-icon-button {
 border-color: var(--color-primary-400) !important;
}

/* Filled state: checked, native-indeterminate, OR MudBlazor's null tri-state.
   MudBlazor v9 marks a `T="bool?" TriState="true"` checkbox in the `null`
   state with `class="mud-checkbox-null"` but does NOT set the underlying
   `<input>`'s JS `indeterminate` property — so `:has(input:indeterminate)`
   never matches and the visual would fall back to "unchecked". Depending on
   the MudBlazor minor version the class lands on either the wrapper
   `.mud-checkbox` or the inner `.mud-icon-button` — covering both. */
.mud-checkbox:has(input:checked) .mud-icon-button,
.mud-checkbox:has(input:indeterminate) .mud-icon-button,
.mud-checkbox.mud-checkbox-null .mud-icon-button,
.mud-checkbox .mud-icon-button.mud-checkbox-null,
.mud-radio:has(input:checked) .mud-icon-button {
 background-color: var(--color-primary-600) !important;
 border-color: var(--color-primary-600) !important;
}

html.dark .mud-checkbox:has(input:checked) .mud-icon-button,
html.dark .mud-checkbox:has(input:indeterminate) .mud-icon-button,
html.dark .mud-checkbox.mud-checkbox-null .mud-icon-button,
html.dark .mud-checkbox .mud-icon-button.mud-checkbox-null,
html.dark .mud-radio:has(input:checked) .mud-icon-button {
 background-color: var(--color-primary-400) !important;
 border-color: var(--color-primary-400) !important;
}

.mud-checkbox:has(input:checked) .mud-icon-button::after {
 content: '';
 position: absolute;
 inset: 0;
 background-image: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'><path d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 1 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0z'/></svg>");
 background-repeat: no-repeat;
 background-position: center;
 background-size: 14px 14px;
 pointer-events: none;
}

/* Indeterminate state — DEPRECATED custom painting. MudBlazor 9.x doesn't set
   the JS prop .indeterminate (zero references in MudBlazor.min.js), so
   :has(input:indeterminate) never matches. The strategy now is to let Mud
   render its native IndeterminateCheckBox icon (see "Indeterminate native
   fallback" block below). The selectors are kept here as defensive coverage
   in case a future Mud release re-introduces the indeterminate flag. */
.mud-checkbox:has(input:indeterminate) .mud-icon-button::after,
.mud-checkbox.mud-checkbox-null .mud-icon-button::after,
.mud-checkbox .mud-icon-button.mud-checkbox-null::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 2px;
    background-color: var(--color-white);
    border-radius: 1px;
    transform: translate(-50%, -50%);
    background-image: none;
    pointer-events: none;
}

.mud-radio:has(input:checked) .mud-icon-button::after {
 content: '';
 position: absolute;
 top: 50%;
 left: 50%;
 width: 6px;
 height: 6px;
 background-color: var(--color-white);
 border-radius: 50%;
 transform: translate(-50%, -50%);
 pointer-events: none;
}

/* === Indeterminate native fallback ============================================
 MudBlazor 9.x no expone el indeterminate state via JS prop ni CSS class — solo
 cambia el icono renderizado (IndeterminateCheckBox SVG). El §30 base oculta
 TODOS los iconos nativos de Mud (.mud-icon-root { visibility: hidden }) para
 pintar custom via ::after — pero ese painting solo funciona para checked
 (detectable via :has(input:checked)), no para indeterminate.
 Estrategia: aplicar la clase opt-in `.av-indeterminate` al MudCheckBox (estática
 o dinámicamente vía @bind). Esta clase:
 1. Re-muestra el .mud-icon-root nativo de Mud (filled square + white bar)
 2. Resetea el background/border custom para que el icono nativo sea el visual
 3. Suprime el ::after de checked por si combina con otros selectors
 Limitación conocida: al hover sobre el checkbox, Mud aplica
 .mud-icon-button:hover { background-color: action-default-hover } y pelea el
 cascade contra nuestro override (specificity tie + !important no resolvió
 limpio en pruebas). Aceptable trade-off — el state visible se mantiene en
 reposo, solo se aliviana al hover y vuelve al salir. */
.av-indeterminate .mud-icon-root {
 visibility: visible !important;
 width: calc(var(--spacing) * 4.5) !important;
 height: calc(var(--spacing) * 4.5) !important;
 font-size: calc(var(--spacing) * 4.5) !important;
}
.av-indeterminate .mud-icon-button {
 background-color: var(--color-primary-600) !important;
 border-color: var(--color-primary-600) !important;
 color: var(--color-white) !important;
}
html.dark .av-indeterminate .mud-icon-button {
 background-color: var(--color-primary-400) !important;
 border-color: var(--color-primary-400) !important;
}
.av-indeterminate .mud-icon-button::after {
 content: none !important;
}
/* Apply color-specific overrides cuando el consumer también pasa av-checkbox-color-X. */
.av-indeterminate.av-checkbox-color-error .mud-icon-button {
 background-color: var(--color-error) !important;
 border-color: var(--color-error) !important;
}
.av-indeterminate.av-checkbox-color-warning .mud-icon-button {
 background-color: var(--color-warning) !important;
 border-color: var(--color-warning) !important;
}
.av-indeterminate.av-checkbox-color-success .mud-icon-button {
 background-color: var(--color-success) !important;
 border-color: var(--color-success) !important;
}
.av-indeterminate.av-checkbox-color-info .mud-icon-button {
 background-color: var(--color-info) !important;
 border-color: var(--color-info) !important;
}
.av-indeterminate.av-checkbox-color-secondary .mud-icon-button {
 background-color: var(--color-secondary) !important;
 border-color: var(--color-secondary) !important;
}

.mud-checkbox.mud-disabled,
.mud-radio.mud-disabled {
 opacity: 0.5 !important;
}

/* ----------------------------------------------------------------------------
   av-checkbox-host--error — wrapper that paints the descendant MudCheckBox's
   checked / indeterminate state in the error color instead of the brand
   primary. Use on header "select all" checkboxes of multi-select tables
   when the design calls for a destructive / attention-getting hue (Tailux
   courses-datatable pattern). Anchored on a host span because MudCheckBox's
   `Class` parameter does not land on the .mud-checkbox node in v9, so a
   class directly on the component would not match these selectors. */
/* Filled state — checked, native-indeterminate, OR MudBlazor's `mud-checkbox-null`
   placed on either the wrapper `.mud-checkbox` or the inner `.mud-button-root`
   (varies by MudBlazor minor version). Same multi-target defense as the base
   checkbox rules above. */
.av-checkbox-host--error .mud-button-root:has(input:checked),
.av-checkbox-host--error .mud-button-root:has(input:indeterminate),
.av-checkbox-host--error .mud-button-root.mud-checkbox-null,
.av-checkbox-host--error .mud-checkbox.mud-checkbox-null .mud-button-root {
    background-color: var(--color-error) !important;
    border-color: var(--color-error) !important;
}

.av-checkbox-host--error .mud-button-root:not(:has(input:checked)):not(:has(input:indeterminate)):not(.mud-checkbox-null):hover,
.av-checkbox-host--error .mud-button-root:not(:has(input:checked)):not(:has(input:indeterminate)):not(.mud-checkbox-null):focus-within,
.av-checkbox-host--error .mud-checkbox:not(.mud-checkbox-null):not(:has(input:checked)):not(:has(input:indeterminate)) .mud-button-root:hover,
.av-checkbox-host--error .mud-checkbox:not(.mud-checkbox-null):not(:has(input:checked)):not(:has(input:indeterminate)) .mud-button-root:focus-within {
    border-color: var(--color-error) !important;
}

.mud-checkbox > .mud-typography,
.mud-radio > .mud-typography {
 font-size: 0.875rem !important;
 line-height: 1.4 !important;
}

.mud-switch .mud-switch-thumb-small,
.mud-switch .mud-switch-thumb-medium,
.mud-switch .mud-switch-thumb-large {
 background: transparent !important;
 box-shadow: none !important;
 border: 0 !important;
 width: 0 !important;
 height: 0 !important;
}

.mud-switch .mud-switch-track {
 position: relative !important;
 width: 36px !important;
 height: 20px !important;
 border-radius: 9999px !important;
 opacity: 1 !important;
 background-color: var(--color-gray-300) !important;
 transition: background-color 150ms ease;
}

html.dark .mud-switch .mud-switch-track {
 background-color: var(--color-dark-400) !important;
}

.mud-switch .mud-switch-base.mud-checked + .mud-switch-track,
.mud-switch .mud-switch-track.mud-primary,
.mud-switch:has(.mud-checked) .mud-switch-track {
 background-color: var(--color-primary-500) !important;
}

html.dark .mud-switch .mud-switch-base.mud-checked + .mud-switch-track,
html.dark .mud-switch .mud-switch-track.mud-primary,
html.dark .mud-switch:has(.mud-checked) .mud-switch-track {
 background-color: var(--color-primary-400) !important;
}

.mud-switch .mud-switch-track::before {
 content: '';
 position: absolute;
 top: 3px;
 left: 3px;
 width: 14px;
 height: 14px;
 border-radius: 50%;
 background-color: var(--color-white);
 box-shadow: 0 1px 2px rgb(from var(--color-gray-900) r g b / 0.25);
 transition: transform 150ms ease;
}

.mud-switch .mud-switch-base.mud-checked + .mud-switch-track::before,
.mud-switch .mud-switch-track.mud-primary[class*="mud-checked"]::before,
.mud-switch:has(.mud-checked) .mud-switch-track::before {
 transform: translateX(16px);
}

.mud-switch .mud-ripple,
.mud-switch .mud-ripple-switch {
 background-color: transparent !important;
 box-shadow: none !important;
}

.mud-switch .mud-switch-base {
 background: transparent !important;
}

.mud-switch .mud-switch-base.mud-disabled + .mud-switch-track,
.mud-switch .mud-switch-base.mud-disabled + .mud-switch-track::before {
 opacity: 0.5 !important;
}

:root {
 --mud-appbar-height: 70px;
}

.appbar-landing-style .mud-toolbar-appbar {
 background: var(--mud-palette-appbar-background);
 backdrop-filter: blur(20px);
 -webkit-backdrop-filter: blur(20px);
 box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
 border-bottom: 1px solid rgba(108, 99, 255, 0.1);
 padding: 0.5rem 1.5rem;
}

.av-appbar__row {
 display: flex;
 align-items: center;
 gap: 16px;
 width: 100%;
 min-width: 0;
}

.av-appbar__brand {
 display: flex;
 align-items: center;
 flex-shrink: 0;
 margin-right: 24px;
}

.av-appbar__actions {
 display: flex;
 align-items: center;
 gap: 8px;
 flex-shrink: 0;
 margin-left: auto;
}

.av-appbar__search {
 display: flex;
 align-items: center;
 gap: 10px;
 flex: 1 1 auto;
 min-width: 240px;
 max-width: 480px;
 height: 38px;
 padding: 0 12px;
 background: var(--color-gray-100, #f1f5f9);
 border: 1px solid var(--color-gray-200, #e2e8f0);
 border-radius: 8px;
 transition: border-color 120ms ease, background-color 120ms ease;
}

.av-appbar__search:focus-within {
 background: var(--color-white, #fff);
 border-color: var(--color-primary-500, #6C63FF);
 box-shadow: 0 0 0 3px rgb(from var(--color-primary-500, #6C63FF) r g b / 0.10);
}

.av-appbar__search-icon {
 color: var(--color-gray-500, #64748b);
 flex-shrink: 0;
}

.av-appbar__search-input {
 flex: 1 1 auto;
 min-width: 0;
 height: 100%;
 border: none;
 outline: none;
 background: transparent;
 font-family: var(--font-sans);
 font-size: var(--text-sm, 0.875rem);
 letter-spacing: 0.01em;
 color: var(--color-gray-800, #1e293b);
}

.av-appbar__search-input::placeholder {
 color: var(--color-gray-500, #64748b);
 font-weight: 400;
}

.av-appbar__search-shortcut {
 display: inline-flex;
 align-items: center;
 height: 22px;
 padding: 0 6px;
 background: var(--color-white, #fff);
 border: 1px solid var(--color-gray-200, #e2e8f0);
 border-radius: 5px;
 font-family: var(--font-mono);
 font-size: var(--text-tiny-plus, 0.6875rem);
 font-weight: 500;
 color: var(--color-gray-600, #475569);
 flex-shrink: 0;
 white-space: nowrap;
}

.av-appbar__search-trigger {
 flex-shrink: 0;
}

.av-appbar__actions .mud-icon-button {
 width: 36px;
 height: 36px;
 padding: 6px;
}

html.dark .av-appbar__search {
 background: var(--color-dark-700, #1c1d21);
 border-color: var(--color-dark-500, #2a2c32);
}

html.dark .av-appbar__search:focus-within {
 background: var(--color-dark-600, #232429);
 border-color: var(--color-primary-400);
 box-shadow: 0 0 0 3px rgb(from var(--color-primary-400) r g b / 0.15);
}

html.dark .av-appbar__search-input {
 color: var(--color-dark-50, #e6e7eb);
}

html.dark .av-appbar__search-input::placeholder {
 color: var(--color-dark-300, #838794);
}

html.dark .av-appbar__search-icon {
 color: var(--color-dark-300, #838794);
}

html.dark .av-appbar__search-shortcut {
 background: var(--color-dark-600, #232429);
 border-color: var(--color-dark-500, #2a2c32);
 color: var(--color-dark-200, #b7bac4);
}

@media (max-width: 959px) {
 .appbar-landing-style .mud-toolbar-appbar {
 padding: 0.5rem 1rem;
 }

 .av-appbar__row {
 gap: 8px;
 }

 .av-appbar__brand {
 margin-right: 12px;
 }
}

@media (max-width: 599px) {
 :root {
 --mud-appbar-height: 56px;
 }

 .appbar-landing-style .mud-toolbar-appbar {
 padding: 0.5rem 0.75rem;
 }

 .av-appbar__row {
 gap: 4px;
 }

 .av-appbar__brand {
 margin-right: 0;
 }

 .applogo-tagline {
 display: none !important;
 }

 .av-appbar__actions .mud-icon-button {
 width: 34px;
 height: 34px;
 }

 .av-lang-switcher {
 padding: 4px 6px 4px 7px !important;
 height: 32px;
 }

 .av-lang-switcher__code {
 font-size: var(--text-xs-plus, 0.8125rem);
 }

 .av-user-avatar {
 width: 32px !important;
 height: 32px !important;
 }
}

.notification-panel {
 --notif-bg: var(--mud-palette-surface);
 --notif-bg-hover: var(--mud-palette-action-hover);
 --notif-bg-unread: rgba(var(--mud-palette-info-rgb), 0.04);
 --notif-border: var(--mud-palette-divider);
 --notif-text-primary: var(--mud-palette-text-primary);
 --notif-text-secondary: var(--mud-palette-text-secondary);
 --notif-accent: var(--mud-palette-info);
 --notif-accent-rgb: var(--mud-palette-info-rgb);
 --notif-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
 --notif-radius: 12px;
}

.notification-badge .mud-badge.mud-badge-dot,
.notification-badge-pulse .mud-badge.mud-badge-dot {
 width: 10px;
 height: 10px;
 min-width: 10px;
 min-height: 10px;
 padding: 0;
 border-radius: 9999px;
 background-color: #EF4444 !important;
 border: 2px solid var(--color-white);
 box-shadow: 0 0 0 1px rgb(0 0 0 / 0.04);
}

html.dark .notification-badge .mud-badge.mud-badge-dot,
html.dark .notification-badge-pulse .mud-badge.mud-badge-dot {
 border-color: var(--color-dark-700);
 box-shadow: 0 0 0 1px rgb(0 0 0 / 0.4);
}

.notification-badge .mud-badge.mud-badge-dot,
.notification-badge-pulse .mud-badge.mud-badge-dot {
 animation: badge-pulse 1.6s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes badge-pulse {
 0%, 100% {
 transform: scale(1);
 box-shadow: 0 0 0 0 rgb(239 68 68 / 0.55),
 0 0 0 1px rgb(0 0 0 / 0.04);
 }
 50% {
 transform: scale(1.15);
 box-shadow: 0 0 0 6px rgb(239 68 68 / 0),
 0 0 0 1px rgb(0 0 0 / 0.04);
 }
}

.notification-bell-btn {
 transition: transform 0.2s ease, background-color 0.2s ease;
}

 .notification-bell-btn:hover {
 transform: scale(1.05);
 }

.notification-badge .mud-badge.mud-badge-top.right.mud-badge-overlap,
.notification-badge-pulse .mud-badge.mud-badge-top.right.mud-badge-overlap {
 inset: auto auto calc(100% - 14px) calc(100% - 12px) !important;
}

.notification-panel {
 width: 380px;
 height: min(32rem, calc(100vh - 6rem));
 display: flex;
 flex-direction: column;
 background: var(--notif-bg);
 overflow: hidden;
 border-radius: var(--notif-radius);
 box-shadow: var(--notif-shadow);
}

.notification-header {
 flex-shrink: 0;
 padding: 8px 16px 0;
 background: var(--color-gray-100);
 border-bottom: none;
}

html.dark .notification-header {
 background: var(--color-dark-800);
}

.header-content {
 display: flex;
 justify-content: space-between;
 align-items: flex-start;
 margin-bottom: 4px;
}

.header-title {
 display: flex;
 align-items: center;
 gap: 8px;
}

.header-main-text {
 margin: 0 !important;
 font-family: var(--font-sans);
 font-size: var(--text-sm, 0.875rem) !important;
 font-weight: var(--font-weight-medium, 500) !important;
 line-height: 1.25 !important;
 letter-spacing: 0 !important;
 color: var(--color-gray-800);
}

html.dark .header-main-text {
 color: var(--color-dark-100);
}

.notification-badge-inline {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 height: 20px;
 min-width: 20px;
 padding: 0 6px;
 border-radius: 9999px;
 background: rgb(from var(--color-primary-500) r g b / 0.15);
 color: var(--color-primary-700);
 font-family: var(--font-sans);
 font-size: 12px;
 font-weight: var(--font-weight-medium, 500);
 line-height: 1;
 white-space: nowrap;
}

html.dark .notification-badge-inline {
 background: rgb(from var(--color-primary-400) r g b / 0.20);
 color: var(--color-primary-300);
}

.header-actions {
 display: flex;
 align-items: center;
 gap: 2px;
}

.header-action-btn.mud-icon-button {
 width: 28px !important;
 height: 28px !important;
 min-width: 28px !important;
 padding: 0 !important;
 border-radius: 9999px !important;
 color: var(--color-gray-600) !important;
 background: transparent !important;
 box-shadow: none !important;
 transition: background-color 150ms ease, color 150ms ease !important;
}

 .header-action-btn.mud-icon-button .mud-icon-root {
 font-size: 16px !important;
 width: 16px !important;
 height: 16px !important;
 }

 .header-action-btn.mud-icon-button:hover:not(:disabled):not(.mud-disabled) {
 background: rgb(from var(--color-gray-500) r g b / 0.12) !important;
 color: var(--color-gray-900) !important;
 transform: none !important;
 }

 .header-action-btn.mud-icon-button:disabled,
 .header-action-btn.mud-icon-button.mud-disabled {
 opacity: 0.35;
 color: var(--color-gray-500) !important;
 }

html.dark .header-action-btn.mud-icon-button {
 color: var(--color-dark-200) !important;
}

 html.dark .header-action-btn.mud-icon-button:hover:not(:disabled):not(.mud-disabled) {
 background: rgb(from var(--color-dark-400) r g b / 0.40) !important;
 color: var(--color-dark-100) !important;
 }

.notification-tabs.mud-tabs,
.notification-tabs {
 margin: 0 !important;
 padding: 0 12px !important;
 background: transparent !important;
 border-radius: 0 !important;
 box-shadow: none !important;
 overflow: visible !important;
}

 .notification-tabs .mud-tabs-toolbar,
 .notification-tabs .mud-tabs-toolbar-inner,
 .notification-tabs .mud-tabs-toolbar-content,
 .notification-tabs .mud-tabs-tabbar,
 .notification-tabs .mud-tabs-tabbar-wrapper {
 background: transparent !important;
 border: none !important;
 min-height: auto !important;
 padding: 0 !important;
 margin: 0 !important;
 box-shadow: none !important;

 justify-content: flex-start !important;

 overflow: visible !important;
 overflow-x: visible !important;
 overflow-y: visible !important;
 }

.notification-tabs .mud-tab-slider {
 display: none !important;
 }

.notification-tabs .mud-tabs-panels {
 display: none !important;
 }

.notification-tabs.mud-tabs .mud-tab,
 .notification-tabs .mud-tab {
 padding: 8px 12px 0px 12px !important;
 margin: 0 !important;
 border-top: none !important;
 border-right: none !important;
 border-left: none !important;
 border-bottom: 2px solid transparent !important;
 border-radius: 0 !important;
 font-family: var(--font-sans) !important;
 font-size: var(--text-sm) !important;
 font-weight: var(--font-weight-medium, 500) !important;
 text-transform: none !important;
 letter-spacing: 0 !important;
 color: var(--color-gray-700) !important;
 background: transparent !important;
 background-image: none !important;
 box-shadow: none !important;
 opacity: 1 !important;
 text-decoration: none !important;
 transition: color 150ms ease, border-color 150ms ease !important;
 white-space: nowrap !important;
 flex-shrink: 0 !important;
 }

 .notification-tabs.mud-tabs .mud-tab:hover,
 .notification-tabs.mud-tabs .mud-tab:focus,
 .notification-tabs.mud-tabs .mud-tab:focus-visible,
 .notification-tabs.mud-tabs .mud-tab:active,
 .notification-tabs .mud-tab:hover,
 .notification-tabs .mud-tab:focus,
 .notification-tabs .mud-tab:focus-visible,
 .notification-tabs .mud-tab:active {
 color: var(--color-gray-800) !important;
 background: transparent !important;
 background-image: none !important;
 box-shadow: none !important;
 outline: none !important;
 }

.notification-tabs .mud-tab .mud-ripple,
 .notification-tabs .mud-tab .mud-ripple-visual,
 .notification-tabs .mud-tab .mud-ripple-container,
 .notification-tabs .mud-tab::before,
 .notification-tabs .mud-tab::after {
 display: none !important;
 background: transparent !important;
 }

.notification-tabs .mud-tab > *,
 .notification-tabs .mud-tab .mud-tab-icon-text,
 .notification-tabs .mud-tab .mud-button-label,
 .notification-tabs .mud-tab .mud-tab-text-wrapper {
 background: transparent !important;
 background-image: none !important;
 box-shadow: none !important;
 }

.notification-tabs .mud-tab .mud-badge-root {
 position: relative !important;
 display: inline-block !important;

 flex-direction: initial !important;
 gap: 0 !important;
 }

 .notification-tabs .mud-tab .mud-badge-root .mud-badge-wrapper,
 .notification-tabs .mud-tab .mud-badge-root .mud-badge {
 position: absolute !important;
 top: 0 !important;
 bottom: auto !important;
 right: auto !important;
 left: 0 !important;

 transform: scale(1) translate(-76%, -85%) !important;
 transform-origin: 0% 0% !important;
 }

.notification-tabs.mud-tabs .mud-tab.mud-tab-active,
 .notification-tabs.mud-tabs .mud-tab.mud-tab-active:hover,
 .notification-tabs.mud-tabs .mud-tab.mud-tab-active:focus,
 .notification-tabs .mud-tab.mud-tab-active,
 .notification-tabs .mud-tab.mud-tab-active:hover,
 .notification-tabs .mud-tab.mud-tab-active:focus {
 color: var(--color-primary-600) !important;
 border-bottom-color: var(--color-primary-600) !important;
 background: transparent !important;
 background-image: none !important;
 box-shadow: none !important;
 text-decoration: none !important;
 }

.notification-tabs .mud-tab.mud-tab-active .mud-ripple {
 color: rgb(from var(--color-primary-600) r g b / 0.18) !important;
 }

html.dark .notification-tabs.mud-tabs .mud-tab,
html.dark .notification-tabs .mud-tab {
 color: var(--color-dark-200) !important;
}

 html.dark .notification-tabs .mud-tab:hover,
 html.dark .notification-tabs .mud-tab:focus {
 color: var(--color-dark-100) !important;
 }

 html.dark .notification-tabs.mud-tabs .mud-tab.mud-tab-active,
 html.dark .notification-tabs.mud-tabs .mud-tab.mud-tab-active:hover,
 html.dark .notification-tabs.mud-tabs .mud-tab.mud-tab-active:focus,
 html.dark .notification-tabs .mud-tab.mud-tab-active,
 html.dark .notification-tabs .mud-tab.mud-tab-active:hover,
 html.dark .notification-tabs .mud-tab.mud-tab-active:focus {
 color: var(--color-primary-400) !important;
 border-bottom-color: var(--color-primary-500) !important;
 }

.notification-skeleton {
 flex: 1 1 auto;
 min-height: 0;
 overflow-y: auto;
 padding: 16px 20px;
}

.skeleton-item {
 display: flex;
 gap: 14px;
 padding: 14px 0;
 animation: skeleton-fade-in 0.3s ease-out both;
}

@keyframes skeleton-fade-in {
 from {
 opacity: 0;
 transform: translateY(8px);
 }

 to {
 opacity: 1;
 transform: translateY(0);
 }
}

.skeleton-item:not(:last-child) {
 border-bottom: 1px solid var(--notif-border);
}

.skeleton-content {
 flex: 1;
 display: flex;
 flex-direction: column;
 gap: 6px;
}

.empty-state {
 flex: 1 1 auto;
 min-height: 0;
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 padding: 48px 32px;
 text-align: center;
}

.empty-state-icon {
 width: 72px;
 height: 72px;
 display: flex;
 align-items: center;
 justify-content: center;
 background: linear-gradient(135deg, rgba(var(--notif-accent-rgb), 0.1) 0%, rgba(var(--notif-accent-rgb), 0.02) 100%);
 border-radius: 50%;
 margin-bottom: 16px;
}

 .empty-state-icon .mud-icon-root {
 opacity: 0.5;
 }

.empty-state-title {
 font-weight: 500 !important;
 color: var(--notif-text-primary);
 margin-bottom: 4px;
}

.empty-state-subtitle {
 color: var(--notif-text-secondary);
 opacity: 0.7;
 font-size: 0.85rem;
 max-width: 200px;
}

.notification-list-container {
 flex: 1 1 auto;
 min-height: 0;
 overflow-y: auto;
 scroll-behavior: smooth;
 padding: 16px;
}

 .notification-list-container::-webkit-scrollbar {
 width: 6px;
 }

 .notification-list-container::-webkit-scrollbar-track {
 background: transparent;
 }

 .notification-list-container::-webkit-scrollbar-thumb {
 background-color: var(--notif-border);
 border-radius: 3px;
 transition: background-color 0.2s ease;
 }

 .notification-list-container::-webkit-scrollbar-thumb:hover {
 background-color: var(--notif-text-secondary);
 }

.date-header {
 display: none;
}

.date-group {
 display: flex;
 flex-direction: column;
 gap: 16px;
}

.date-group + .date-group {
 margin-top: 16px;
}

.notification-item {
 display: flex;
 align-items: center;
 padding: 0;
 margin: 0;
 gap: 12px;
 position: relative;
 border: none;
 border-radius: 0;
 background: transparent;
 cursor: pointer;
 transition: opacity 150ms ease;
}

.notification-item:hover {
 background: transparent;
 transform: none;
 }

.notification-item.unread,
 .notification-item.read {
 background: transparent;
 opacity: 1;
 }

 .notification-item.new-notification {
 animation: slide-in-highlight 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
 }

@keyframes slide-in-highlight {
 0% {
 opacity: 0;
 transform: translateY(-12px) scale(0.98);
 }

 100% {
 opacity: 1;
 transform: translateY(0) scale(1);
 }
}

.notification-item.deleting {
 animation: fade-out-slide 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes fade-out-slide {
 0% {
 opacity: 1;
 transform: translateX(0) scale(1);
 max-height: 100px;
 }

 100% {
 opacity: 0;
 transform: translateX(30px) scale(0.95);
 max-height: 0;
 padding-top: 0;
 padding-bottom: 0;
 margin-top: 0;
 margin-bottom: 0;
 }
}

.unread-indicator,
.mention-indicator {
 display: none;
}

.notification-icon {
 flex-shrink: 0;
 width: 40px;
 height: 40px;
 display: flex;
 align-items: center;
 justify-content: center;
 border-radius: 8px;
 background: var(--mud-palette-action-disabled);
 transition: none;
}

.notification-icon .mud-icon-root {
 color: #fff !important;
 font-size: 18px !important;
 width: 18px !important;
 height: 18px !important;
 }

.notification-icon.type-default {
 background: var(--mud-palette-grey-default, var(--color-gray-400));
 }

 .notification-icon.type-info {
 background: var(--mud-palette-info);
 }

 .notification-icon.type-success {
 background: var(--mud-palette-success);
 }

 .notification-icon.type-warning {
 background: var(--mud-palette-warning);
 }

 .notification-icon.type-error {
 background: var(--mud-palette-error);
 }

.notification-icon.mention-icon {
 background: var(--mud-palette-primary);
 }

.notification-item:hover .notification-icon {
 transform: none;
 }

.notification-content {
 flex: 1;
 min-width: 0;
 display: flex;
 flex-direction: column;
}

.notification-title-row {
 display: flex;
 align-items: center;
 gap: 6px;
 min-width: 0;
}

.notification-title {
 margin: 0;
 font-family: var(--font-sans);
 font-size: var(--text-sm, 0.875rem);
 font-weight: var(--font-weight-medium, 500);
 line-height: 1.25;
 color: var(--color-gray-800);
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
 transition: color 150ms ease;
}

html.dark .notification-title {
 color: var(--color-dark-100);
}

.unread-title {
 font-weight: 600 !important;
}

.read-title {
 font-weight: var(--font-weight-medium, 500) !important;
 color: var(--color-gray-800) !important;
}

html.dark .read-title {
 color: var(--color-dark-100) !important;
}

.notification-type-chip {
 height: 18px !important;
 font-size: 10px !important;
 font-weight: 500 !important;
 padding: 0 6px !important;
 border-radius: 9999px !important;
}

 .notification-type-chip .mud-chip-content {
 padding: 0 !important;
 }

.notification-message {
 margin-top: 2px;
 font-family: var(--font-sans);
 font-size: var(--text-xs, 0.75rem);
 line-height: 1.4;
 color: var(--color-gray-700);
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
 display: block;
 -webkit-line-clamp: unset;
 -webkit-box-orient: unset;
}

html.dark .notification-message {
 color: var(--color-dark-200);
}

.notification-footer-row {
 display: flex;
 align-items: center;
 justify-content: space-between;
 margin-top: 4px;
}

.notification-time-wrapper {
 display: flex;
 align-items: center;
 gap: 4px;
}

.time-icon {
 display: none !important;
}

.notification-time {
 font-family: var(--font-sans);
 font-size: var(--text-xs, 0.75rem);
 color: var(--color-gray-400);
 line-height: 1;
 opacity: 1;
}

html.dark .notification-time {
 color: var(--color-dark-300);
}

.notification-actions {
 display: flex;
 align-items: center;
 gap: 2px;
 flex-shrink: 0;
 opacity: 0;
 transform: translateX(4px);
 transition: opacity 180ms ease, transform 180ms ease;
}

.notification-item:hover .notification-actions,
.notification-item:focus-within .notification-actions {
 opacity: 1;
 transform: translateX(0);
}

.action-btn.mud-icon-button {
 width: 28px !important;
 height: 28px !important;
 min-width: 28px !important;
 padding: 0 !important;
 border-radius: 9999px !important;
 color: var(--color-gray-500) !important;
 background: transparent !important;
 box-shadow: none !important;
 transition: background-color 150ms ease, color 150ms ease !important;
}

 .action-btn.mud-icon-button .mud-icon-root {
 font-size: 16px !important;
 width: 16px !important;
 height: 16px !important;
 color: inherit !important;
 }

.action-btn.mud-icon-button:hover {
 background: rgb(from var(--color-gray-500) r g b / 0.12) !important;
 color: var(--color-gray-800) !important;
 transform: none !important;
 }

.action-btn:not(.delete-btn).mud-icon-button:hover {
 background: rgb(from var(--color-primary-500) r g b / 0.14) !important;
 color: var(--color-primary-600) !important;
}

.delete-btn.mud-icon-button:hover {
 background: rgb(from var(--mud-palette-error) r g b / 0.12) !important;
 color: var(--mud-palette-error) !important;
}

html.dark .action-btn.mud-icon-button {
 color: var(--color-dark-300) !important;
}

 html.dark .action-btn.mud-icon-button:hover {
 background: rgb(from var(--color-dark-400) r g b / 0.40) !important;
 color: var(--color-dark-100) !important;
 }

 html.dark .action-btn:not(.delete-btn).mud-icon-button:hover {
 background: rgb(from var(--color-primary-400) r g b / 0.22) !important;
 color: var(--color-primary-300) !important;
 }

 html.dark .delete-btn.mud-icon-button:hover {
 background: rgb(from var(--mud-palette-error) r g b / 0.18) !important;
 color: var(--mud-palette-error) !important;
 }

.notification-footer {
 flex-shrink: 0;
 padding: 0;
 border-top: none;
 background: var(--color-gray-100);
}

html.dark .notification-footer {
 background: var(--color-dark-800);
}

.view-all-btn.mud-button {
 display: inline-flex !important;
 align-items: center !important;
 justify-content: center !important;
 cursor: pointer !important;
 width: 100% !important;
 min-height: 0 !important;
 height: auto !important;
 padding: 8px 20px !important;
 border: none !important;
 border-radius: 0 !important;
 outline: none !important;
 background: var(--color-gray-150) !important;
 background-image: none !important;
 box-shadow: none !important;
 font-family: var(--font-sans) !important;
 font-size: var(--text-sm, 0.875rem) !important;
 font-weight: 500 !important;
 line-height: 1.25rem !important;
 letter-spacing: 0.025em !important;
 color: var(--color-gray-900) !important;
 text-transform: none !important;
 text-align: center !important;
 transition: all 200ms !important;
}

 .view-all-btn.mud-button:hover,
 .view-all-btn.mud-button:focus,
 .view-all-btn.mud-button:focus-visible {
 background: var(--color-gray-200) !important;
 color: var(--color-gray-900) !important;
 outline: none !important;
 box-shadow: none !important;
 transform: none !important;
 }

 .view-all-btn.mud-button:active {
 background: rgb(from var(--color-gray-200) r g b / 0.80) !important;
 outline: none !important;
 box-shadow: none !important;
 }

.view-all-btn.mud-button .mud-ripple,
 .view-all-btn.mud-button .mud-ripple-visual {
 display: none !important;
 }

html.dark .view-all-btn.mud-button {
 background: var(--surface-2) !important;
 color: var(--color-dark-50) !important;
}

 html.dark .view-all-btn.mud-button:hover,
 html.dark .view-all-btn.mud-button:focus,
 html.dark .view-all-btn.mud-button:focus-visible {
 background: var(--surface-1) !important;
 color: var(--color-dark-50) !important;
 }

 html.dark .view-all-btn.mud-button:active {
 background: rgb(from var(--surface-1) r g b / 0.90) !important;
 }

.notification-item.mention-notification,
.notification-item.mention-notification.unread,
.notification-item.mention-notification:hover {
 background: transparent;
 border-left: none;
}

.notification-action-btn {
 font-size: 0.7rem !important;
 min-width: auto !important;
 height: 24px !important;
 text-transform: none !important;
 padding: 0 8px !important;
 border-radius: 6px !important;
 font-weight: 500 !important;
}

 .notification-action-btn .mud-button-label {
 font-size: 0.7rem !important;
 }

.notification-badge-pulse .notification-bell-btn {
 animation: icon-ring 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes icon-ring {
 0%, 100% { transform: rotate(0deg); }
 15% { transform: rotate(-12deg); }
 30% { transform: rotate(12deg); }
 45% { transform: rotate(-8deg); }
 60% { transform: rotate(8deg); }
 75% { transform: rotate(-4deg); }
 90% { transform: rotate(4deg); }
}

@media (max-width: 420px) {
 .notification-panel {
 width: calc(100vw - 16px);
 max-height: 80vh;
 }

 .notification-header {
 padding: 14px 16px 10px;
 }

 .notification-item {
 padding: 12px 16px;
 margin: 0 4px;
 }

 .notification-icon {
 width: 36px;
 height: 36px;
 }
}

.mud-theme-dark .notification-panel {
 --notif-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
 --notif-bg-unread: rgba(var(--mud-palette-info-rgb), 0.08);
}

.mud-theme-dark .notification-icon {
 background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
}

 .mud-theme-dark .notification-icon.unread-icon {
 background: linear-gradient(135deg, rgba(var(--notif-accent-rgb), 0.2) 0%, rgba(var(--notif-accent-rgb), 0.08) 100%);
 }

.av-orbit-loader {
 display: inline-flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 gap: 12px;

}

.av-orbit-loader__svg {
 display: block;
 width: 100%;
 height: 100%;
 overflow: visible;
}

.av-orbit-loader--sm,
.av-orbit-loader--sm .av-orbit-loader__svg {
 width: 32px;
 height: 32px;
}

.av-orbit-loader--md,
.av-orbit-loader--md .av-orbit-loader__svg {
 width: 64px;
 height: 64px;
}

.av-orbit-loader--lg,
.av-orbit-loader--lg .av-orbit-loader__svg {
 width: 128px;
 height: 128px;
}

.av-orbit-loader__ring {
 fill: none;
 stroke: var(--color-primary-500, #0A6BFF);
 stroke-width: 1;
}

.av-orbit-loader__ring--outer { opacity: 0.22; }
.av-orbit-loader__ring--middle { opacity: 0.28; }
.av-orbit-loader__ring--inner { opacity: 0.34; }

.av-orbit-loader__dot--primary {
 fill: var(--color-primary-500, #0A6BFF);
}

.av-orbit-loader__dot--info {
 fill: var(--color-info, #00A3C7);
}

.av-orbit-loader__dot--success {
 fill: var(--color-success, #25C16F);
}

.av-orbit-loader__group--outer {
 transform-origin: 50% 50%;
 animation: av-orbit-spin-cw 4s linear infinite;
}

.av-orbit-loader__group--middle {
 transform-origin: 50% 50%;
 animation: av-orbit-spin-ccw 2.5s linear infinite;
}

.av-orbit-loader__group--inner {
 transform-origin: 50% 50%;
 animation: av-orbit-spin-cw 1.7s linear infinite;
}

@keyframes av-orbit-spin-cw {
 from { transform: rotate(0deg); }
 to { transform: rotate(360deg); }
}

@keyframes av-orbit-spin-ccw {
 from { transform: rotate(0deg); }
 to { transform: rotate(-360deg); }
}

.av-orbit-loader__label {
 font-family: var(--font-sans);
 font-size: 13px;
 font-weight: 500;
 line-height: 1.4;
 letter-spacing: 0.01em;
 color: var(--color-gray-700, #475569);
 text-align: center;
 max-width: 200px;
}

html.dark .av-orbit-loader__label {
 color: var(--color-dark-200);
}

@media (prefers-reduced-motion: reduce) {
 .av-orbit-loader__group--outer,
 .av-orbit-loader__group--inner,
 .av-orbit-loader__dot {
 animation: none;
 }
}

.dv1-page {

 --dv1-amber: #F59E0B;
 --dv1-amber-bg: rgb(254 243 199 / 1);
 --dv1-amber-text: #B45309;
 --dv1-green-bg: rgb(from var(--color-success-light) r g b / 0.12);
 --dv1-green-text: var(--color-success-darker);
 --dv1-blue-bg: rgb(from var(--color-primary-500) r g b / 0.10);
 --dv1-blue-text: var(--color-primary-700);
 --dv1-gray-bg: var(--color-gray-100);
 --dv1-gray-text: var(--color-gray-700);
 --dv1-surface: var(--color-white);
 --dv1-page-bg: transparent;
 --dv1-border: var(--color-gray-200);
 --dv1-ink: var(--color-gray-900);
 --dv1-ink-soft: var(--color-gray-600);

 display: flex;
 flex-direction: column;
 gap: 24px;
 padding: 4px 0 32px;
 font-family: var(--font-sans);
 color: var(--dv1-ink);
}

.dv1-hero {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 16px;
 flex-wrap: wrap;
 padding: 4px 0;
}

.dv1-hero-left {
 display: inline-flex;
 align-items: center;
 gap: 14px;
 min-width: 0;
 flex-wrap: wrap;
}

.dv1-breadcrumbs {
 display: inline-flex;
 align-items: center;
 gap: 6px;
 font-family: var(--font-sans);
 font-size: var(--text-sm-plus);
 line-height: 1.2;
}

.dv1-breadcrumbs__link {
 color: var(--color-gray-500);
 font-weight: 400;
 text-decoration: none;
 transition: color 120ms ease;
}

.dv1-breadcrumbs__link:hover {
 color: var(--color-gray-700);
}

.dv1-breadcrumbs__sep.mud-icon-root {
 width: 14px;
 height: 14px;
 color: var(--color-gray-300);
}

.dv1-breadcrumbs__current {
 color: var(--color-gray-800);
 font-weight: 500;
}

html.dark .dv1-breadcrumbs__link { color: var(--color-dark-300); }
html.dark .dv1-breadcrumbs__link:hover { color: var(--color-dark-100); }
html.dark .dv1-breadcrumbs__sep.mud-icon-root { color: var(--color-dark-400); }
html.dark .dv1-breadcrumbs__current { color: var(--color-dark-50); }

.dv1-hero-divider {
 display: inline-block;
 width: 1px;
 height: 16px;
 background: var(--color-gray-200);
}

html.dark .dv1-hero-divider {
 background: var(--color-dark-500);
}

.dv1-sync-status {
 display: inline-flex;
 align-items: center;
 gap: 6px;
 font-family: var(--font-sans);
 font-size: 12px;
 font-weight: 500;
 color: var(--color-gray-500);
 line-height: 1.2;
 white-space: nowrap;
}

.dv1-sync-status__icon.mud-icon-root {
 width: 14px;
 height: 14px;
 color: var(--color-gray-400);
}

html.dark .dv1-sync-status {
 color: var(--color-dark-300);
}

html.dark .dv1-sync-status__icon.mud-icon-root {
 color: var(--color-dark-400);
}

.dv1-hero-title {
 margin: 0;
 font-family: var(--font-sans);
 font-weight: 500;
 font-size: 14px;
 line-height: 1.3;
 letter-spacing: 0;
 color: var(--dv1-ink-soft);
}

.dv1-hero-title .dv1-hero-name {
 font-weight: 600;
 color: var(--color-primary-600);
}

.dv1-hero-date {
 color: var(--dv1-ink);
 font-weight: 500;
}

.dv1-hero-subtitle {
 margin: 6px 0 0;
 font-size: var(--text-sm);
 color: var(--dv1-ink-soft);
 display: flex;
 align-items: center;
 gap: 8px;
 flex-wrap: wrap;
}

.dv1-hero-emph {
 color: var(--dv1-amber-text);
 font-weight: 500;
}

.dv1-hero-sep {
 color: var(--color-gray-400);
}

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

.dv1-action-btn.mud-icon-button {
 width: 36px;
 height: 36px;
 border: 1px solid var(--dv1-border);
 border-radius: 9999px;
 color: var(--dv1-ink-soft);
 background: var(--dv1-surface);
 transition: border-color 120ms ease, color 120ms ease, background-color 120ms ease;
}

.dv1-action-btn.mud-icon-button:hover {
 border-color: var(--color-primary-400);
 color: var(--color-primary-600);
 background: var(--dv1-blue-bg);
}

html.dark .dv1-action-btn.mud-icon-button:hover {
 color: var(--color-primary-300);
}

.dv1-card {
 background: var(--dv1-surface);
 border: 1px solid var(--dv1-border);
 border-radius: 12px;
 padding: 20px;
 display: flex;
 flex-direction: column;
 gap: 16px;
 min-height: 0;
}

.dv1-card-header {
 display: flex;
 align-items: baseline;
 justify-content: space-between;
 gap: 12px;
}

.dv1-card-title {
 margin: 0;
 font-family: var(--font-sans) !important;
 font-size: var(--text-sm-plus) !important;
 font-weight: 500 !important;
 letter-spacing: 0.025em !important;
 line-height: 1.4 !important;
 color: var(--color-gray-800);
}

html.dark .dv1-card-title {
 color: var(--color-dark-100);
}

.dv1-card-count {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 min-width: 22px;
 height: 22px;
 padding: 0 8px;
 border-radius: 9999px;
 background: var(--dv1-blue-bg);
 color: var(--dv1-blue-text);
 font-size: 12px;
 font-weight: 600;
}

.dv1-card-subtitle {
 font-size: 12px;
 color: var(--dv1-ink-soft);
 font-weight: 500;
}

.dv1-card-footer {
 margin-top: auto;
 padding-top: 12px;
 border-top: 1px dashed var(--dv1-border);
}

.dv1-link {
 display: inline-flex;
 align-items: center;
 gap: 6px;
 font-size: var(--text-sm);
 font-weight: 500;
 color: var(--color-primary-600);
 text-decoration: none;
}

.dv1-link:hover {
 color: var(--color-primary-700);
 text-decoration: underline;
}

.dv1-link--muted {
 color: var(--dv1-ink-soft);
}

.dv1-link--muted:hover {
 color: var(--dv1-ink);
}

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

.dv1-kpi {
 position: relative;
 overflow-wrap: break-word;
 word-break: normal;
 background: var(--color-white);
 border-radius: 0.5rem;
 box-shadow:
 rgba(145, 158, 171, 0.20) 0px 0px 2px 0px,
 rgba(145, 158, 171, 0.12) 0px 12px 24px -4px;
 padding: 1.25rem;
 display: flex;
 justify-content: space-between;
 gap: 16px;
 min-width: 0;
 transition: transform 160ms ease, box-shadow 160ms ease;
}

.dv1-kpi:hover {
 transform: translateY(-1px);
}

html.dark .dv1-kpi {
 background: var(--color-dark-700);
 box-shadow: none;
}

@media print {
 .dv1-kpi {
 border: 1px solid var(--color-gray-200);
 box-shadow: none;
 }
}

.dv1-kpi-text {
 display: flex;
 flex-direction: column;
 min-width: 0;
 flex: 1;
}

.dv1-kpi-label {
 font-size: 13px;
 color: var(--dv1-ink-soft);
 font-weight: 400;
 line-height: 1.4;
}

.dv1-kpi-value {
 margin-top: 2px;
 font-family: var(--font-sans);
 font-weight: 500;
 font-size: 24px;
 line-height: 1.25;
 letter-spacing: -0.01em;
}

.dv1-kpi--blue .dv1-kpi-value { color: #0EA5E9; }
.dv1-kpi--amber .dv1-kpi-value { color: #F59E0B; }
.dv1-kpi--green .dv1-kpi-value { color: var(--color-success); }
.dv1-kpi--rose .dv1-kpi-value { color: #EC4899; }
.dv1-kpi--gray .dv1-kpi-value { color: var(--color-gray-700); }

html.dark .dv1-kpi--blue .dv1-kpi-value { color: #38BDF8; }
html.dark .dv1-kpi--amber .dv1-kpi-value { color: #FBBF24; }
html.dark .dv1-kpi--green .dv1-kpi-value { color: var(--color-success-lighter); }
html.dark .dv1-kpi--rose .dv1-kpi-value { color: #F472B6; }
html.dark .dv1-kpi--gray .dv1-kpi-value { color: var(--color-dark-100); }

.dv1-kpi-delta {
 margin-top: 12px;
 display: inline-flex;
 align-items: center;
 gap: 4px;
 font-size: 13px;
 font-weight: 500;
 color: var(--color-success);
}

html.dark .dv1-kpi-delta {
 color: var(--color-success-lighter);
}

.dv1-kpi-delta .mud-icon-root {
 width: 14px;
 height: 14px;
}

.dv1-kpi-icon {
 width: 48px;
 height: 48px;
 border-radius: 28%;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 flex-shrink: 0;
 align-self: flex-start;
}

.dv1-kpi-icon .mud-icon-root {
 width: 24px;
 height: 24px;
}

.dv1-kpi--blue .dv1-kpi-icon { background: rgb(14 165 233 / 0.12); color: #0284C7; }
.dv1-kpi--amber .dv1-kpi-icon { background: rgb(245 158 11 / 0.14); color: #D97706; }
.dv1-kpi--green .dv1-kpi-icon { background: rgb(34 197 94 / 0.12); color: var(--color-success); }
.dv1-kpi--rose .dv1-kpi-icon { background: rgb(236 72 153 / 0.12); color: #DB2777; }
.dv1-kpi--gray .dv1-kpi-icon { background: var(--dv1-gray-bg); color: var(--dv1-gray-text); }

html.dark .dv1-kpi--blue .dv1-kpi-icon { background: rgb(14 165 233 / 0.20); color: #38BDF8; }
html.dark .dv1-kpi--amber .dv1-kpi-icon { background: rgb(245 158 11 / 0.22); color: #FBBF24; }
html.dark .dv1-kpi--green .dv1-kpi-icon { background: rgb(34 197 94 / 0.20); color: var(--color-success-lighter); }
html.dark .dv1-kpi--rose .dv1-kpi-icon { background: rgb(236 72 153 / 0.20); color: #F472B6; }

.dv1-kpi-delta--bad { color: var(--color-error); }

.dv1-op-grid {
 display: grid;
 grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
 gap: 20px;
}

.dv1-app-list {
 display: flex;
 flex-direction: column;
 gap: 4px;
}

.dv1-app-row {
 display: grid;
 grid-template-columns: 36px minmax(0, 1fr) auto;
 align-items: center;
 gap: 12px;
 padding: 10px 8px;
 border-radius: 8px;
 transition: background-color 120ms ease;
}

.dv1-app-row:hover {
 background-color: var(--color-gray-100);
}

html.dark .dv1-app-row:hover {
 background-color: var(--color-dark-600);
}

.dv1-avatar {
 width: 36px;
 height: 36px;
 border-radius: 9999px;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 font-size: 13px;
 font-weight: 600;
 font-family: var(--font-sans);
 letter-spacing: 0.02em;
 flex-shrink: 0;
}

.dv1-app-body {
 display: flex;
 flex-direction: column;
 gap: 2px;
 min-width: 0;
}

.dv1-app-name {
 font-size: var(--text-sm);
 font-weight: 600;
 color: var(--dv1-ink);
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}

.dv1-app-meta {
 display: inline-flex;
 align-items: center;
 gap: 6px;
 font-size: 12px;
 color: var(--dv1-ink-soft);
}

.dv1-app-meta-dot {
 color: var(--color-gray-400);
}

.dv1-app-meta-text {
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}

.dv1-status-pill {
 display: inline-flex;
 align-items: center;
 height: 18px;
 padding: 0 8px;
 border-radius: 9999px;
 font-size: 10px;
 font-weight: 600;
 text-transform: uppercase;
 letter-spacing: 0.06em;
 line-height: 1;
}

.dv1-status-pill--draft {
 background: var(--color-gray-100);
 color: var(--color-gray-700);
}

.dv1-status-pill--sent {
 background: var(--dv1-blue-bg);
 color: var(--dv1-blue-text);
}

html.dark .dv1-status-pill--draft {
 background: var(--color-dark-500);
 color: var(--color-dark-100);
}

.dv1-app-days {
 font-size: 11px;
 font-weight: 700;
 padding: 4px 10px;
 border-radius: 9999px;
 line-height: 1;
}

.dv1-app-days--critical { color: var(--color-error-darker); background: rgb(from var(--color-error-light) r g b / 0.10); }
.dv1-app-days--warning { color: var(--dv1-amber-text); background: var(--dv1-amber-bg); }
.dv1-app-days--info { color: var(--dv1-blue-text); background: var(--dv1-blue-bg); }

html.dark .dv1-app-days--critical {
 color: #FCA5A5;
 background: rgb(from var(--color-error-light) r g b / 0.20);
}

.dv1-officer-list {
 display: flex;
 flex-direction: column;
 gap: 12px;
}

.dv1-officer-row {
 display: grid;
 grid-template-columns: 36px minmax(0, 1fr) auto;
 align-items: center;
 gap: 12px;
 padding: 8px 4px;
 border-radius: 8px;
 transition: background-color 120ms ease;
}

.dv1-officer-row:hover {
 background-color: var(--color-gray-100);
}

html.dark .dv1-officer-row:hover {
 background-color: var(--color-dark-600);
}

.dv1-officer-body {
 display: flex;
 flex-direction: column;
 gap: 6px;
 min-width: 0;
}

.dv1-officer-name {
 font-size: var(--text-sm);
 font-weight: 600;
 color: var(--dv1-ink);
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}

.dv1-officer-bar {
 height: 6px;
 background: var(--color-gray-100);
 border-radius: 9999px;
 overflow: hidden;
}

.dv1-officer-bar-fill {
 display: block;
 height: 100%;
 min-width: 3px;
 border-radius: 9999px;
}

.dv1-officer-bar-fill--light { background: linear-gradient(90deg, var(--color-success-lighter), var(--color-success)); }
.dv1-officer-bar-fill--medium { background: linear-gradient(90deg, var(--color-primary-400), var(--color-primary-600)); }
.dv1-officer-bar-fill--heavy { background: linear-gradient(90deg, #FB923C, #EA580C); }

html.dark .dv1-officer-bar { background: var(--color-dark-500); }

.dv1-workload-chip {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 min-width: 28px;
 height: 22px;
 padding: 0 8px;
 border-radius: 9999px;
 font-size: 11px;
 font-weight: 700;
 line-height: 1;
}

.dv1-workload-chip--light { background: var(--dv1-green-bg); color: var(--dv1-green-text); }
.dv1-workload-chip--medium { background: var(--dv1-blue-bg); color: var(--dv1-blue-text); }
.dv1-workload-chip--heavy { background: rgb(254 215 170 / 1); color: #9A3412; }

html.dark .dv1-workload-chip--heavy {
 background: rgb(154 52 18 / 0.30);
 color: #FED7AA;
}

.dv1-detail-grid {
 display: grid;
 grid-template-columns: repeat(2, minmax(0, 1fr));
 gap: 20px;
}

.dv1-empty {
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 gap: 4px;
 padding: 28px 16px;
 text-align: center;
}

.dv1-empty-icon {
 width: 56px;
 height: 56px;
 border-radius: 9999px;
 background: var(--dv1-green-bg);
 color: var(--dv1-green-text);
 display: inline-flex;
 align-items: center;
 justify-content: center;
 margin-bottom: 8px;
}

.dv1-empty-icon .mud-icon-root {
 width: 28px;
 height: 28px;
}

.dv1-empty-title {
 margin: 0;
 font-size: var(--text-sm);
 font-weight: 600;
 color: var(--dv1-ink);
}

.dv1-empty-subtitle {
 margin: 0;
 font-size: 12px;
 color: var(--dv1-ink-soft);
}

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

.dv1-doc-stat {
 background: var(--color-gray-50);
 border-radius: 8px;
 padding: 12px 8px;
 text-align: center;
}

.dv1-doc-stat-value {
 font-family: var(--font-display);
 font-size: 22px;
 font-weight: 600;
 line-height: 1;
}

.dv1-doc-stat-value--amber { color: var(--dv1-amber-text); }
.dv1-doc-stat-value--blue { color: var(--dv1-blue-text); }
.dv1-doc-stat-value--green { color: var(--dv1-green-text); }

.dv1-doc-stat-label {
 margin-top: 4px;
 font-size: 11px;
 color: var(--dv1-ink-soft);
 font-weight: 500;
 text-transform: uppercase;
 letter-spacing: 0.04em;
}

.dv1-doc-progress {
 height: 6px;
 background: var(--color-gray-100);
 border-radius: 9999px;
 overflow: hidden;
}

.dv1-doc-progress-fill {
 height: 100%;
 background: linear-gradient(90deg, var(--color-success-lighter), var(--color-success));
 border-radius: 9999px;
 transition: width 240ms ease;
}

.dv1-highlights-grid {
 display: grid;
 grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
 gap: 20px;
}

.dv1-hero-card {
 position: relative;
 overflow: hidden;
 border-radius: 16px;
 padding: 22px 24px;
 color: var(--color-white);
 background:
 radial-gradient(circle at 100% 100%, rgb(255 255 255 / 0.15) 0%, transparent 50%),
 linear-gradient(135deg, #0050D4 0%, #0A6BFF 55%, #2E7CFF 100%);
 box-shadow: 0 6px 24px rgb(10 107 255 / 0.20);
 display: flex;
 gap: 18px;
 align-items: stretch;
 min-height: 168px;
}

.dv1-hero-card__icon {
 width: 64px;
 height: 64px;
 border-radius: 16px;
 background: rgb(255 255 255 / 0.18);
 display: inline-flex;
 align-items: center;
 justify-content: center;
 flex-shrink: 0;
 align-self: center;
}

.dv1-hero-card__icon .mud-icon-root {
 width: 30px;
 height: 30px;
 color: var(--color-white);
}

.dv1-hero-card__body {
 display: flex;
 flex-direction: column;
 justify-content: center;
 gap: 8px;
 flex: 1;
 min-width: 0;
}

.dv1-hero-card__label {
 font-size: 14px;
 font-weight: 500;
 letter-spacing: 0.01em;
 color: rgb(255 255 255 / 0.85);
}

.dv1-hero-card__value {
 font-family: var(--font-display);
 font-weight: 700;
 font-size: 44px;
 line-height: 1;
 letter-spacing: -0.02em;
 color: var(--color-white);
}

.dv1-hero-card__footnote {
 font-size: 12px;
 color: rgb(255 255 255 / 0.80);
 line-height: 1.4;
}

.dv1-hero-card__progress {
 position: relative;
 height: 24px;
 margin-top: 10px;
}

.dv1-hero-card__progress-track {
 position: absolute;
 inset: 0;
 top: 50%;
 transform: translateY(-50%);
 height: 4px;
 background: rgb(255 255 255 / 0.20);
 border-radius: 9999px;
}

.dv1-hero-card__progress-fill {
 position: absolute;
 left: 0;
 top: 50%;
 transform: translateY(-50%);
 height: 4px;
 max-width: 100%;
 background: rgb(255 255 255 / 0.95);
 border-radius: 9999px;
 transition: width 800ms cubic-bezier(0.4, 0, 0.2, 1);
 box-shadow: 0 0 8px rgb(255 255 255 / 0.30);
}

.dv1-hero-card__progress-thumb {
 position: absolute;
 top: 50%;
 transform: translate(-50%, -50%);
 display: inline-flex;
 align-items: center;
 justify-content: center;
 padding: 4px 10px;
 min-width: 38px;
 height: 22px;
 border-radius: 9999px;
 background: rgb(15 23 42 / 0.45);
 backdrop-filter: blur(6px);
 color: var(--color-white);
 font-family: var(--font-sans);
 font-size: 11px;
 font-weight: 700;
 letter-spacing: 0.02em;
 line-height: 1;
 white-space: nowrap;
 border: 1px solid rgb(255 255 255 / 0.30);
 transition: left 800ms cubic-bezier(0.4, 0, 0.2, 1);
}

.dv1-sale-card {
 display: flex;
 flex-direction: column;
 align-items: center;
 gap: 14px;
}

.dv1-sale-card .dv1-card-header {
 width: 100%;
}

.dv1-progress-ring-wrap {
 display: flex;
 align-items: center;
 justify-content: center;
 padding: 6px 0 4px;
}

.dv1-progress-ring {
 width: 140px;
 height: 140px;
}

.dv1-progress-ring__track {
 fill: none;
 stroke: var(--color-gray-100);
 stroke-width: 10;
}

html.dark .dv1-progress-ring__track {
 stroke: var(--color-dark-500);
}

.dv1-progress-ring__fill {
 fill: none;
 stroke: url(#dv1-progress-grad);
 stroke: var(--color-primary-600);
 stroke-width: 10;
 stroke-linecap: round;
 transition: stroke-dashoffset 420ms cubic-bezier(0.4, 0, 0.2, 1);
}

.dv1-progress-ring__pct {
 font-family: var(--font-display);
 font-size: 24px;
 font-weight: 700;
 letter-spacing: -0.01em;
 fill: var(--dv1-ink);
}

html.dark .dv1-progress-ring__pct {
 fill: var(--color-dark-50);
}

.dv1-sales-row {
 display: grid;
 grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
 gap: 20px;
 align-items: stretch;
}

.dv1-mini-grid {
 display: grid;
 grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
 grid-template-rows: minmax(140px, 1fr) auto minmax(140px, 1fr);
 gap: 20px;
}

.dv1-mini-card--tall {
 grid-row: span 2;
}

.dv1-mini-card--horiz {
 grid-row: span 1;
}

.dv1-mini-card {
 padding: 16px 18px;
 display: flex;
 flex-direction: column;
 gap: 8px;
}

.dv1-mini-card--tall {
 justify-content: flex-start;
}

.dv1-mini-value {
 font-family: var(--font-display);
 font-weight: 700;
 font-size: 22px;
 line-height: 1.2;
 color: var(--dv1-ink);
 letter-spacing: -0.01em;
}

.dv1-mini-bar-chart {
 margin: 6px -8px -6px;
 flex: 1;
 min-height: 110px;
}

.dv1-mini-area-chart {
 margin: 6px -16px -16px;
 flex: 1;
 min-height: 130px;
}

.dv1-mini-card--horiz {
 flex-direction: row;
 align-items: center;
 gap: 12px;
 padding: 14px 18px;
}

.dv1-mini-ring {
 position: relative;
 width: 48px;
 height: 48px;
 flex-shrink: 0;
 display: inline-flex;
 align-items: center;
 justify-content: center;
}

.dv1-mini-ring svg {
 width: 100%;
 height: 100%;
}

.dv1-mini-ring__track {
 fill: none;
 stroke: var(--color-gray-100);
 stroke-width: 4;
}

html.dark .dv1-mini-ring__track {
 stroke: var(--color-dark-500);
}

.dv1-mini-ring__fill {
 fill: none;
 stroke-width: 4;
 stroke-linecap: round;
}

.dv1-mini-ring--success .dv1-mini-ring__fill { stroke: var(--color-success); }
.dv1-mini-ring--primary .dv1-mini-ring__fill { stroke: var(--color-primary-600); }

.dv1-mini-ring__pct {
 position: absolute;
 inset: 0;
 display: flex;
 align-items: center;
 justify-content: center;
 font-family: var(--font-sans);
 font-size: 11px;
 font-weight: 600;
 color: var(--dv1-ink);
}

.dv1-mini-ring-label {
 font-size: var(--text-sm-plus);
 font-weight: 500;
 color: var(--dv1-ink);
 line-height: 1.3;
}

@media (max-width: 1199px) {
 .dv1-sales-row {
 grid-template-columns: minmax(0, 1fr);
 }
}

@media (max-width: 599px) {
 .dv1-mini-grid {
 grid-template-columns: minmax(0, 1fr);
 grid-template-rows: none;
 }

 .dv1-mini-card--tall,
 .dv1-mini-card--horiz {
 grid-row: auto;
 }
}

.dv1-card--chart {
 gap: 12px;
}

.dv1-metric-toggle {
 display: inline-flex;
 align-items: center;
 background: var(--color-gray-100);
 border-radius: 9999px;
 padding: 3px;
 gap: 2px;
}

html.dark .dv1-metric-toggle {
 background: var(--color-dark-600);
}

.dv1-toggle-btn {
 appearance: none;
 border: 0;
 background: transparent;
 padding: 5px 14px;
 font-family: var(--font-sans);
 font-size: 12px;
 font-weight: 500;
 color: var(--dv1-ink-soft);
 border-radius: 9999px;
 cursor: pointer;
 transition: background-color 120ms ease, color 120ms ease;
 line-height: 1.2;
}

.dv1-toggle-btn:hover {
 color: var(--dv1-ink);
}

.dv1-toggle-btn--active {
 background: var(--dv1-surface);
 color: var(--color-primary-700);
 box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
}

html.dark .dv1-toggle-btn--active {
 background: var(--color-dark-500);
 color: var(--color-primary-300);
}

.dv1-sales-chart {
 width: 100%;
 margin: 4px -8px 0;
 min-height: 280px;
}

.dv1-sales-chart .apexcharts-canvas {
 width: 100% !important;
}

.dv1-card-footnote {
 font-size: 12px;
 color: var(--dv1-ink-soft);
 padding-top: 8px;
 border-top: 1px dashed var(--dv1-border);
}

.dv1-funnel-grid {
 display: grid;
 grid-template-columns: repeat(2, minmax(0, 1fr));
 gap: 20px;
}

.dv1-funnel {
 display: flex;
 flex-direction: column;
 gap: 10px;
 padding: 8px 0;
}

.dv1-funnel-row {
 display: grid;
 grid-template-columns: 110px minmax(0, 1fr) 40px;
 align-items: center;
 gap: 12px;
}

.dv1-funnel-label {
 font-size: var(--text-sm);
 font-weight: 500;
 color: var(--dv1-ink);
}

.dv1-funnel-bar-wrap {
 height: 24px;
 background: var(--color-gray-100);
 border-radius: 6px;
 overflow: hidden;
}

html.dark .dv1-funnel-bar-wrap {
 background: var(--color-dark-600);
}

.dv1-funnel-bar {
 display: block;
 height: 100%;
 min-width: 6px;
 border-radius: 6px;
}

.dv1-funnel-bar--blue {
 background: linear-gradient(90deg, var(--color-primary-500), var(--color-primary-600));
}

.dv1-funnel-bar--amber {
 background: linear-gradient(90deg, #F59E0B, #D97706);
}

.dv1-funnel-bar--green {
 background: linear-gradient(90deg, var(--color-success-light), var(--color-success));
}

.dv1-funnel-count {
 font-size: 12px;
 font-weight: 600;
 color: var(--dv1-ink);
 text-align: right;
}

.dv1-donut-wrap {
 display: grid;
 grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
 align-items: center;
 gap: 8px;
}

.dv1-donut-chart {
 min-height: 220px;
}

.dv1-donut-legend {
 list-style: none;
 margin: 0;
 padding: 0;
 display: flex;
 flex-direction: column;
 gap: 10px;
}

.dv1-donut-legend-item {
 display: grid;
 grid-template-columns: 14px minmax(0, 1fr) auto;
 align-items: center;
 gap: 10px;
 font-size: 13px;
}

.dv1-donut-swatch {
 width: 12px;
 height: 12px;
 border-radius: 3px;
}

.dv1-donut-legend-label {
 color: var(--dv1-ink-soft);
}

.dv1-donut-legend-value {
 font-weight: 600;
 color: var(--dv1-ink);
}

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

.dv1-closing-card {
 display: flex;
 align-items: stretch;
 gap: 14px;
 padding: 14px;
 border: 1px solid var(--dv1-border);
 border-radius: 12px;
 background: var(--dv1-surface);
 transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.dv1-closing-card:hover {
 transform: translateY(-1px);
 border-color: var(--color-primary-300);
 box-shadow: 0 4px 12px rgb(from var(--color-primary-500) r g b / 0.08);
}

.dv1-closing-date {
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 width: 48px;
 border-radius: 10px;
 background: var(--dv1-blue-bg);
 color: var(--dv1-blue-text);
 flex-shrink: 0;
}

.dv1-closing-day-num {
 font-family: var(--font-display);
 font-size: 20px;
 font-weight: 700;
 line-height: 1;
}

.dv1-closing-day-name {
 font-size: 10px;
 font-weight: 600;
 text-transform: uppercase;
 letter-spacing: 0.08em;
 margin-top: 3px;
}

.dv1-closing-body {
 display: flex;
 flex-direction: column;
 justify-content: space-between;
 gap: 6px;
 min-width: 0;
 flex: 1;
}

.dv1-closing-head {
 display: inline-flex;
 align-items: center;
 gap: 8px;
 min-width: 0;
}

.dv1-avatar--sm {
 width: 24px;
 height: 24px;
 font-size: 10px;
}

.dv1-closing-borrower {
 font-size: var(--text-sm);
 font-weight: 600;
 color: var(--dv1-ink);
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}

.dv1-closing-foot {
 display: inline-flex;
 align-items: center;
 justify-content: space-between;
 gap: 8px;
}

.dv1-closing-amount {
 font-family: var(--font-display);
 font-size: 16px;
 font-weight: 700;
 color: var(--color-success-darker);
}

html.dark .dv1-closing-amount {
 color: var(--color-success-lighter);
}

.dv1-closing-tag {
 font-size: 10px;
 font-weight: 600;
 text-transform: uppercase;
 letter-spacing: 0.08em;
 color: var(--dv1-ink-soft);
 padding: 3px 8px;
 border-radius: 9999px;
 background: var(--color-gray-100);
}

html.dark .dv1-closing-tag {
 background: var(--color-dark-600);
}

.dv1-customize-hint {
 margin: 0 0 12px;
 font-size: 12px;
 color: var(--dv1-ink-soft);
}

.dv1-customize-list {
 display: flex;
 flex-direction: column;
 gap: 4px;
 margin-bottom: 20px;
}

.dv1-customize-row {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 12px;
 padding: 8px 10px;
 border-radius: 6px;
 cursor: pointer;
 transition: background-color 120ms ease;
}

.dv1-customize-row:hover {
 background: var(--color-gray-100);
}

html.dark .dv1-customize-row:hover {
 background: var(--color-dark-600);
}

.dv1-customize-label {
 font-size: var(--text-sm);
 color: var(--dv1-ink);
 font-weight: 500;
}

.dv1-customize-reset.mud-button {
 text-transform: none;
}

.dv1-page-footer {
 display: flex;
 justify-content: flex-end;
 padding: 0 4px;
}

html.dark .dv1-page {
 --dv1-amber-bg: rgb(146 64 14 / 0.25);
 --dv1-amber-text: #FCD34D;
 --dv1-green-bg: rgb(from var(--color-success-light) r g b / 0.18);
 --dv1-green-text: var(--color-success-lighter);
 --dv1-blue-bg: rgb(from var(--color-primary-500) r g b / 0.18);
 --dv1-blue-text: var(--color-primary-300);
 --dv1-gray-bg: var(--color-dark-600);
 --dv1-gray-text: var(--color-dark-100);
 --dv1-surface: var(--color-dark-700);
 --dv1-border: var(--color-dark-500);
 --dv1-ink: var(--color-dark-50);
 --dv1-ink-soft: var(--color-dark-200);
}

html.dark .dv1-app-row:hover,
html.dark .dv1-doc-stat {
 background-color: var(--color-dark-600);
}

html.dark .dv1-officer-bar,
html.dark .dv1-doc-progress {
 background-color: var(--color-dark-500);
}

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

@media (max-width: 899px) {
 .dv1-op-grid,
 .dv1-detail-grid,
 .dv1-funnel-grid,
 .dv1-highlights-grid {
 grid-template-columns: minmax(0, 1fr);
 }

 .dv1-donut-wrap {
 grid-template-columns: minmax(0, 1fr);
 }

 .dv1-hero {
 flex-direction: column;
 align-items: stretch;
 }

 .dv1-funnel-row {
 grid-template-columns: 90px minmax(0, 1fr) 32px;
 }

 .dv1-hero-card__value {
 font-size: 36px;
 }
}

@media (max-width: 599px) {
 .dv1-kpi-grid {
 grid-template-columns: minmax(0, 1fr);
 }

 .dv1-hero-title {
 font-size: 22px;
 }
}

.av-user-menu {
 min-width: 256px !important;
 max-width: 256px !important;
 border-radius: 8px !important;
 overflow: hidden !important;
 border: 1px solid var(--color-gray-150, #e9eef5);
 box-shadow:
 rgba(145, 158, 171, 0.2) 0 0 2px 0,
 rgba(145, 158, 171, 0.12) 0 12px 24px -4px;
}

.av-user-menu .mud-list,
.av-user-menu .mud-menu-list,
.av-user-menu .mud-popover-content {
 padding: 0 !important;
 background: var(--color-white, #fff) !important;
}

.av-user-menu__header {
 display: flex;
 align-items: center;
 gap: 16px;
 padding: 20px 16px;
 background: var(--color-gray-100, #f1f5f9);
}

.av-user-menu__avatar {
 width: 56px !important;
 height: 56px !important;
 flex-shrink: 0;
}

.av-user-menu__user-text {
 display: flex;
 flex-direction: column;
 min-width: 0;
}

.av-user-menu__user-name {
 font-family: var(--font-sans);
 font-size: var(--text-base, 1rem);
 font-weight: var(--font-weight-medium, 500);
 color: var(--color-gray-700, #475569);
 line-height: 1.25;
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
}

.av-user-menu__user-role {
 font-family: var(--font-sans);
 font-size: var(--text-xs, 0.75rem);
 color: var(--color-gray-400, #94a3b8);
 line-height: 1.3;
 margin-top: 2px;
 word-break: break-word;
}

.av-user-menu__items {
 display: flex;
 flex-direction: column;
 padding: 8px 0 8px;
}

.av-user-menu .av-user-menu__item.mud-menu-item,
.av-user-menu .av-user-menu__item {
 display: flex !important;
 align-items: center !important;
 gap: 12px !important;
 padding: 8px 16px !important;
 border-radius: 0 !important;
 letter-spacing: 0.025em;
 cursor: pointer;
 text-decoration: none;
 color: inherit;
 transition: background-color 200ms ease, color 200ms ease;
}

.av-user-menu .av-user-menu__item:hover {
 background-color: var(--color-gray-100, #f1f5f9) !important;
}

.av-user-menu .av-user-menu__item > *:not(.av-user-menu__item-row),
.av-user-menu .av-user-menu__item .mud-list-item-text,
.av-user-menu .av-user-menu__item .mud-menu-item-text,
.av-user-menu .av-user-menu__item .mud-button-label,
.av-user-menu .av-user-menu__item .mud-typography {
 display: contents !important;
}

.av-user-menu__item-row {
 display: flex !important;
 flex-direction: row !important;
 align-items: center !important;
 gap: 12px !important;
 width: 100%;
 min-width: 0;
}

.av-user-menu__item-icon {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 width: 32px;
 height: 32px;
 border-radius: 8px;
 flex-shrink: 0;
 color: #fff;
}

.av-user-menu__item-icon .mud-icon-root {
 color: #fff !important;
 width: 18px;
 height: 18px;
}

.av-user-menu__item-icon--warning { background: var(--color-warning, #f59200); }
.av-user-menu__item-icon--info { background: var(--color-info, #0284c7); }
.av-user-menu__item-icon--secondary { background: var(--color-secondary, #e000ad); }
.av-user-menu__item-icon--error { background: var(--color-error, #ff4f1a); }
.av-user-menu__item-icon--success { background: var(--color-success, #16a34a); }

.av-user-menu__item-text {
 display: flex;
 flex-direction: column;
 flex: 1;
 min-width: 0;
}

.av-user-menu__item-title {
 font-family: var(--font-sans);
 font-size: var(--text-sm, 0.875rem);
 font-weight: var(--font-weight-medium, 500);
 color: var(--color-gray-800, #1e293b);
 line-height: 1.25;
 transition: color 200ms ease;
}

.av-user-menu .av-user-menu__item:hover .av-user-menu__item-title {
 color: var(--color-primary-600);
}

.av-user-menu__item-subtitle {
 font-family: var(--font-sans);
 font-size: var(--text-xs, 0.75rem);
 font-weight: 400;
 color: var(--color-gray-400, #94a3b8);
 line-height: 1.3;
 margin-top: 1px;
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
}

.av-user-menu__item-count {
 margin-left: auto;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 min-width: 22px;
 height: 22px;
 padding: 0 8px;
 border-radius: 9999px;
 background: rgb(from var(--color-primary-500) r g b / 0.12);
 color: var(--color-primary-700);
 font-family: var(--font-sans);
 font-size: 12px;
 font-weight: 600;
 line-height: 1;
 flex-shrink: 0;
}

.av-user-menu__footer {
 padding: 16px;
}

.av-user-menu .av-user-menu__logout.mud-button {
 background: var(--color-gray-100, #f1f5f9) !important;
 color: var(--color-gray-800, #1e293b) !important;
 font-family: var(--font-sans);
 font-size: var(--text-sm, 0.875rem);
 font-weight: var(--font-weight-medium, 500);
 text-transform: none !important;
 border-radius: 8px !important;
 height: 36px;
 border: 1px solid var(--color-gray-150, #e9eef5) !important;
 box-shadow: none !important;
 gap: 8px;
}

.av-user-menu .av-user-menu__logout.mud-button:hover {
 background: var(--color-gray-200, #e2e8f0) !important;
}

.av-user-menu .av-user-menu__logout .mud-button-icon-start {
 color: var(--color-gray-600, #475569);
}

html.dark .av-user-menu {
 border-color: var(--color-dark-600, #232429);
 box-shadow: 0 3px 10px 0 rgb(25 25 25 / 30%);
}

html.dark .av-user-menu .mud-list,
html.dark .av-user-menu .mud-menu-list,
html.dark .av-user-menu .mud-popover-content {
 background: var(--color-dark-700, #1c1d21) !important;
}

html.dark .av-user-menu__header {
 background: var(--color-dark-800, #15161a);
}

html.dark .av-user-menu__user-name {
 color: var(--color-dark-100, #d0d2db);
}

html.dark .av-user-menu__user-role {
 color: var(--color-dark-300, #838794);
}

html.dark .av-user-menu .av-user-menu__item:hover {
 background-color: var(--color-dark-600, #232429) !important;
}

html.dark .av-user-menu__item-title {
 color: var(--color-dark-100, #d0d2db);
}

html.dark .av-user-menu .av-user-menu__item:hover .av-user-menu__item-title {
 color: var(--color-primary-400);
}

html.dark .av-user-menu__item-subtitle {
 color: var(--color-dark-300, #838794);
}

html.dark .av-user-menu__item-count {
 background: rgb(from var(--color-primary-400) r g b / 0.20);
 color: var(--color-primary-300);
}

html.dark .av-user-menu .av-user-menu__logout.mud-button {
 background: var(--color-dark-600, #232429) !important;
 color: var(--color-dark-100, #d0d2db) !important;
 border-color: var(--color-dark-500, #2a2c32) !important;
}

html.dark .av-user-menu .av-user-menu__logout.mud-button:hover {
 background: var(--color-dark-500, #2a2c32) !important;
}

html.dark .av-user-menu .av-user-menu__logout .mud-button-icon-start {
 color: var(--color-dark-300, #838794);
}

.av-lang-trigger {
 transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.av-lang-trigger:hover {
 transform: scale(1.1);
 background-color: rgb(from var(--color-primary-500) r g b / 0.12);
 color: var(--color-primary-600);
}

html.dark .av-lang-trigger:hover {
 background-color: rgb(from var(--color-primary-400) r g b / 0.18);
 color: var(--color-primary-300);
}

.av-mode-toggle {
 margin-right: 10px;
}

.av-lang-popover .mud-list {
 padding: 4px;
 min-width: 200px;
 max-height: 280px;
 overflow-y: auto;
 border-radius: 8px;

 scrollbar-width: thin;
 scrollbar-color: var(--color-gray-300) transparent;
}

.av-lang-popover .mud-list::-webkit-scrollbar {
 width: 4px;
}

.av-lang-popover .mud-list::-webkit-scrollbar-track {
 background: transparent;
}

.av-lang-popover .mud-list::-webkit-scrollbar-thumb {
 background: rgb(from var(--color-gray-300) r g b / 0.6);
 border-radius: 4px;
}

html.dark .av-lang-popover .mud-list::-webkit-scrollbar-thumb {
 background: rgb(from var(--color-dark-400) r g b / 0.6);
}

.av-lang-item.mud-list-item,
.av-lang-item.mud-menu-item {
 padding: 0 12px !important;
 margin: 1px 0;
 background-color: transparent !important;
}

.av-lang-item.mud-list-item:hover,
.av-lang-item.mud-list-item:focus,
.av-lang-item.mud-list-item:focus-visible,
.av-lang-item.mud-list-item.mud-selected-item,
.av-lang-item.mud-menu-item:hover,
.av-lang-item.mud-menu-item:focus,
.av-lang-item.mud-menu-item:focus-visible,
.av-lang-item.mud-menu-item.mud-selected-item {
 background-color: transparent !important;
}

.av-lang-row {
 display: flex;
 align-items: center;
 gap: 12px;
 width: 100%;
 padding: 8px 12px;
 border-radius: 6px;
 font-family: var(--font-sans);
 font-size: var(--text-sm);
 line-height: 1.2;
 transition: background-color 120ms ease, color 120ms ease;
}

.av-lang-item.mud-list-item:hover .av-lang-row:not(.av-lang-row--active),
.av-lang-item.mud-menu-item:hover .av-lang-row:not(.av-lang-row--active) {
 background-color: var(--color-gray-100);
}

html.dark .av-lang-item.mud-list-item:hover .av-lang-row:not(.av-lang-row--active),
html.dark .av-lang-item.mud-menu-item:hover .av-lang-row:not(.av-lang-row--active) {
 background-color: var(--color-dark-600);
}

.av-lang-row--active {
 background-color: var(--color-primary-600);
}

html.dark .av-lang-row--active {
 background-color: var(--color-primary-500);
}

.av-lang-flag {
 width: 20px;
 height: 20px;
 border-radius: 9999px;
 object-fit: cover;
 flex-shrink: 0;
 opacity: 1 !important;
 box-shadow: 0 0 0 1px rgb(0 0 0 / 0.06);
}

html.dark .av-lang-flag {
 box-shadow: 0 0 0 1px rgb(255 255 255 / 0.1);
}

.av-lang-label {
 color: var(--color-gray-800);
}

html.dark .av-lang-label {
 color: var(--color-dark-100);
}

.av-lang-row--active .av-lang-label {
 color: var(--color-white);
}

.av-conn__group.mud-paper {
 background: var(--color-white);
 border: 1px solid var(--color-gray-200);
 border-radius: 12px;
 padding: 16px;
 margin-bottom: 16px;
 box-shadow:
 rgba(145, 158, 171, 0.20) 0 0 2px 0,
 rgba(145, 158, 171, 0.12) 0 12px 24px -4px;
}

.av-conn__group.mud-paper:last-child {
 margin-bottom: 0;
}

html.dark .av-conn__group.mud-paper {
 background: var(--color-dark-700);
 border-color: var(--color-dark-500);
 box-shadow: none;
}

.av-conn__group-header {
 padding-bottom: 12px;
 margin-bottom: 12px;
 border-bottom: 1px solid var(--color-gray-100);
}

html.dark .av-conn__group-header {
 border-bottom-color: var(--color-dark-600);
}

.av-conn__group-icon.mud-icon-root {
 color: var(--color-primary-600);
 width: 18px;
 height: 18px;
}

html.dark .av-conn__group-icon.mud-icon-root {
 color: var(--color-primary-300);
}

.av-conn__group-title.mud-typography {
 color: var(--color-gray-800);
}

html.dark .av-conn__group-title.mud-typography {
 color: var(--color-dark-100);
}

.av-conn__group-count {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 min-width: 22px;
 height: 22px;
 padding: 0 8px;
 border-radius: 9999px;
 background: rgb(from var(--color-primary-500) r g b / 0.12);
 color: var(--color-primary-700);
 flex-shrink: 0;
}

html.dark .av-conn__group-count {
 background: rgb(from var(--color-primary-400) r g b / 0.20);
 color: var(--color-primary-300);
}

/* ── Collapsible group header + chevron ──────────────────────────────────── */
.av-conn__group-header--toggle {
 cursor: pointer;
 user-select: none;
}

.av-conn__group-chevron.mud-icon-root {
 width: 18px;
 height: 18px;
 color: var(--color-gray-500);
 transition: transform 150ms ease;
 flex-shrink: 0;
}

html.dark .av-conn__group-chevron.mud-icon-root {
 color: var(--color-dark-300);
}

.av-conn__group-chevron--collapsed.mud-icon-root {
 transform: rotate(-90deg);
}

/* ── Clickable case card + topline (case pill + status badge) ────────────── */
.av-conn-case--clickable.mud-paper {
 cursor: pointer;
}

.av-conn-case__topline {
 width: 100%;
 margin-bottom: 12px;
}

.av-conn-case__topline .av-conn-case__head {
 margin-bottom: 0;
}

.av-conn-case__status.av-badge {
 flex-shrink: 0;
}

/* ── Case created-on meta row ────────────────────────────────────────────── */
.av-conn-case__meta {
 margin-top: 10px;
}

.av-conn-case__meta-icon.mud-icon-root {
 width: 14px;
 height: 14px;
 color: var(--color-gray-500);
}

html.dark .av-conn-case__meta-icon.mud-icon-root {
 color: var(--color-dark-300);
}

.av-conn-case__meta-label.mud-typography {
 color: var(--color-gray-500);
}

html.dark .av-conn-case__meta-label.mud-typography {
 color: var(--color-dark-300);
}

.av-conn-case__meta-value.mud-typography {
 color: var(--color-gray-700);
}

html.dark .av-conn-case__meta-value.mud-typography {
 color: var(--color-dark-100);
}

.av-conn-avatar.mud-avatar {
 width: 36px;
 height: 36px;
 background: rgb(from var(--color-primary-500) r g b / 0.12);
 color: var(--color-primary-700);
 font-family: var(--font-sans);
 font-size: 13px;
 font-weight: 600;
 letter-spacing: 0.02em;
 line-height: 1;
 flex-shrink: 0;
}

html.dark .av-conn-avatar.mud-avatar {
 background: rgb(from var(--color-primary-400) r g b / 0.20);
 color: var(--color-primary-300);
}

.av-conn__cards {
 width: 100%;
}

.av-conn-case.mud-paper {
 border: 1px solid var(--color-gray-200) !important;
 border-radius: 10px !important;
 padding: 12px;
 background: var(--color-gray-50);
 transition: border-color 120ms ease, background-color 120ms ease;
}

.av-conn-case.mud-paper:hover {
 border-color: var(--color-gray-300) !important;
 background: var(--color-white);
}

html.dark .av-conn-case.mud-paper {
 background: var(--color-dark-600);
 border-color: var(--color-dark-500) !important;
}

html.dark .av-conn-case.mud-paper:hover {
 border-color: var(--color-dark-400) !important;
 background: var(--color-dark-700);
}

.av-conn-case__head {
 display: inline-flex;
 align-items: center;
 padding: 6px 10px;
 border-radius: 6px;
 background: rgb(from var(--color-primary-500) r g b / 0.10);
 color: var(--color-primary-700);
 margin-bottom: 12px;
 width: auto;
 align-self: flex-start;
}

html.dark .av-conn-case__head {
 background: rgb(from var(--color-primary-400) r g b / 0.18);
 color: var(--color-primary-300);
}

.av-conn-case__head-icon.mud-icon-root {
 color: inherit;
 width: 14px;
 height: 14px;
}

.av-conn-case__head-label.mud-typography {
 color: inherit;
 opacity: 0.85;
}

.av-conn-case__head-number.mud-typography {
 color: inherit;
}

.av-conn-case__officer-role.mud-typography {
 color: var(--color-gray-500);
}

html.dark .av-conn-case__officer-role.mud-typography {
 color: var(--color-dark-300);
}

.av-conn-case__officer-name.mud-typography {
 color: var(--color-gray-800);
 margin-top: 2px;
}

html.dark .av-conn-case__officer-name.mud-typography {
 color: var(--color-dark-100);
}

.av-conn-case__assistants {
 margin-top: 12px;
 padding-top: 10px;
 border-top: 1px dashed var(--color-gray-200);
}

html.dark .av-conn-case__assistants {
 border-top-color: var(--color-dark-500);
}

.av-conn-case__assistants-label.mud-typography {
 display: block;
 color: var(--color-gray-500);
 margin-bottom: 8px;
}

html.dark .av-conn-case__assistants-label.mud-typography {
 color: var(--color-dark-300);
}

.av-conn-chip {
 height: 28px;
 padding: 0 12px 0 4px;
 border-radius: 9999px;
 background: var(--color-white);
 border: 1px solid var(--color-gray-200);
 transition: border-color 120ms ease;
}

.av-conn-chip:hover {
 border-color: var(--color-primary-300);
}

html.dark .av-conn-chip {
 background: var(--color-dark-700);
 border-color: var(--color-dark-500);
}

html.dark .av-conn-chip:hover {
 border-color: var(--color-primary-400);
}

.av-conn-chip__avatar.mud-avatar {
 width: 22px;
 height: 22px;
 background: rgb(from var(--color-primary-500) r g b / 0.12);
 color: var(--color-primary-700);
 font-size: 10px;
 font-weight: 600;
 line-height: 1;
 letter-spacing: 0.02em;
}

html.dark .av-conn-chip__avatar.mud-avatar {
 background: rgb(from var(--color-primary-400) r g b / 0.20);
 color: var(--color-primary-300);
}

.av-conn-chip__name.mud-typography {
 color: var(--color-gray-700);
}

html.dark .av-conn-chip__name.mud-typography {
 color: var(--color-dark-100);
}

.av-conn-user {
 padding: 8px;
 border-radius: 8px;
 transition: background-color 120ms ease;
}

.av-conn-user:hover {
 background-color: var(--color-gray-100);
}

html.dark .av-conn-user:hover {
 background-color: var(--color-dark-600);
}

.av-conn-user__name.mud-typography {
 color: var(--color-gray-800);
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}

html.dark .av-conn-user__name.mud-typography {
 color: var(--color-dark-100);
}

.av-conn-user__role.mud-typography {
 color: var(--color-gray-500);
 margin-top: 1px;
}

html.dark .av-conn-user__role.mud-typography {
 color: var(--color-dark-300);
}

.av-conn-user__tenant {
 padding: 4px 10px;
 border-radius: 9999px;
 background: var(--color-gray-100);
 color: var(--color-gray-700);
 white-space: nowrap;
 flex-shrink: 0;
}

html.dark .av-conn-user__tenant {
 background: var(--color-dark-600);
 color: var(--color-dark-200);
}

.av-conn-user__tenant .mud-icon-root {
 width: 12px;
 height: 12px;
 opacity: 0.75;
 color: inherit;
}

.av-conn-user__tenant .mud-typography {
 color: inherit;
}

/* ── av-conn-tenant ─────────────────────────────────────────────────────────
   One card per tenant where the contact's user is registered. Replaces the old
   "Connected Users" rows. Scope modifier (--host / --current / --external)
   tints the left edge so the user can scan at a glance which scope they are
   looking at. The scope chip inside the card carries the textual label.
*/

.av-conn__tenants {
 width: 100%;
}

.av-conn-tenant.mud-paper {
 padding: 12px 16px;
 border: 1px solid var(--color-gray-200);
 border-radius: var(--radius-lg);
 background: var(--color-white);
 transition: background 150ms ease, border-color 150ms ease;
 position: relative;
}

html.dark .av-conn-tenant.mud-paper {
 border-color: var(--color-dark-500);
 background: var(--color-dark-700);
}

/* Left-edge accent — scope at a glance. */
.av-conn-tenant.mud-paper::before {
 content: "";
 position: absolute;
 left: 0;
 top: 12px;
 bottom: 12px;
 width: 3px;
 border-radius: 0 9999px 9999px 0;
 background: var(--color-gray-300);
}
html.dark .av-conn-tenant.mud-paper::before {
 background: var(--color-dark-400);
}

.av-conn-tenant--host.mud-paper::before {
 background: var(--color-info);
}
.av-conn-tenant--current.mud-paper::before {
 background: var(--color-success);
}

.av-conn-tenant--host.mud-paper:hover,
.av-conn-tenant--current.mud-paper:hover,
.av-conn-tenant--external.mud-paper:hover {
 background: var(--color-gray-50);
}
html.dark .av-conn-tenant--host.mud-paper:hover,
html.dark .av-conn-tenant--current.mud-paper:hover,
html.dark .av-conn-tenant--external.mud-paper:hover {
 background: var(--color-dark-600);
}

.av-conn-tenant__head {
 width: 100%;
 padding-left: 4px;
 margin-bottom: 10px;
}

.av-conn-tenant__icon {
 width: 36px;
 height: 36px;
 border-radius: var(--radius-md);
 display: inline-flex;
 align-items: center;
 justify-content: center;
 background: var(--color-gray-100);
 color: var(--color-gray-600);
 flex-shrink: 0;
}
html.dark .av-conn-tenant__icon {
 background: var(--color-dark-600);
 color: var(--color-dark-200);
}

.av-conn-tenant__icon--host {
 background: rgb(from var(--color-info) r g b / 0.12);
 color: var(--color-info);
}
.av-conn-tenant__icon--current {
 background: rgb(from var(--color-success) r g b / 0.12);
 color: var(--color-success);
}
.av-conn-tenant__icon--external {
 background: var(--color-gray-100);
 color: var(--color-gray-600);
}
html.dark .av-conn-tenant__icon--external {
 background: var(--color-dark-600);
 color: var(--color-dark-200);
}

.av-conn-tenant__head-text {
 flex: 1 1 auto;
 min-width: 0;
}

.av-conn-tenant__name.mud-typography {
 font-weight: 600;
 color: var(--color-gray-900);
 line-height: 1.25;
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
}
html.dark .av-conn-tenant__name.mud-typography {
 color: var(--color-dark-50);
}

.av-conn-tenant__scope {
 align-self: flex-start;
 margin-top: 2px;
}

.av-conn-tenant__roles-label .mud-typography {
 color: var(--color-gray-500);
 letter-spacing: 0.04em;
 margin-bottom: 4px;
 display: block;
}
html.dark .av-conn-tenant__roles-label .mud-typography {
 color: var(--color-dark-300);
}

.av-conn-tenant__roles {
 width: 100%;
 padding-left: 4px;
}

.av-status__group.mud-paper {
 padding: 16px 20px;
 margin-bottom: 16px;
}

.av-status__grid {
 width: 100%;
 align-items: stretch;
}

.av-status__cell {
 flex: 1 1 0;
 min-width: 0;
 padding: 4px 12px;
 justify-content: center;
}

.av-status__cell:first-child {
 padding-left: 0;
}

.av-status__cell:last-child {
 padding-right: 0;
}

.av-status__divider.mud-divider {
 margin: 0 4px;
 border-color: var(--color-gray-200);
}

html.dark .av-status__divider.mud-divider {
 border-color: var(--color-dark-500);
}

.av-status__cell-label.mud-typography {
 color: var(--color-gray-500);
}

html.dark .av-status__cell-label.mud-typography {
 color: var(--color-dark-300);
}

.av-status__cell-value.mud-typography {
 color: var(--color-gray-800);
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}

html.dark .av-status__cell-value.mud-typography {
 color: var(--color-dark-100);
}

.av-status__actions-block {
 margin-top: 16px;
}

.av-status__actions-block--secondary {
 margin-top: 12px;
 padding-top: 16px;
 border-top: 1px dashed var(--color-gray-200);
}

html.dark .av-status__actions-block--secondary {
 border-top-color: var(--color-dark-500);
}

.av-status__actions-title.mud-typography {
 margin: 0 0 10px;
 color: var(--color-gray-500);
}

html.dark .av-status__actions-title.mud-typography {
 color: var(--color-dark-300);
}

.av-status__actions-row {
 align-items: center;
 row-gap: 8px;
}

/* Last Activity block — sits below the status grid, before the actions block.
   The card uses MudPaper Outlined as the base; this block tweaks the avatar tint,
   text colors, and meta-row spacing so it reads as one cohesive "what happened
   most recently" panel without inventing a whole new component skin. */
.av-status__activity-card.mud-paper {
 border-color: var(--color-gray-200);
 border-radius: var(--radius-lg);
 background: var(--color-white);
}

html.dark .av-status__activity-card.mud-paper {
 border-color: var(--color-dark-500);
 background: var(--color-dark-700);
}

.av-status__activity-avatar.mud-avatar {
 background: rgb(from var(--color-primary-500) r g b / 0.10);
 color: var(--color-primary-600);
}

html.dark .av-status__activity-avatar.mud-avatar {
 background: rgb(from var(--color-primary-400) r g b / 0.18);
 color: var(--color-primary-300);
}

.av-status__activity-text {
 flex: 1 1 auto;
 min-width: 0;
}

.av-status__activity-headline.mud-typography {
 color: var(--color-gray-800);
 font-weight: 500;
}

html.dark .av-status__activity-headline.mud-typography {
 color: var(--color-dark-50);
}

.av-status__activity-meta {
 row-gap: 4px;
}

.av-status__activity-actor.mud-typography,
.av-status__activity-time.mud-typography {
 color: var(--color-gray-500);
}

html.dark .av-status__activity-actor.mud-typography,
html.dark .av-status__activity-time.mud-typography {
 color: var(--color-dark-300);
}

.av-status__activity-reference {
 color: var(--color-gray-600);
}

.av-status__activity-reference .mud-typography {
 color: inherit;
 font-weight: 500;
}

.av-status__activity-reference .mud-icon-root {
 color: var(--color-primary-600);
}

html.dark .av-status__activity-reference {
 color: var(--color-dark-200);
}

html.dark .av-status__activity-reference .mud-icon-root {
 color: var(--color-primary-400);
}

@media (max-width: 640px) {
 .av-status__grid {
 flex-direction: column !important;
 gap: 12px;
 }

 .av-status__divider.mud-divider {
 display: none;
 }

 .av-status__cell {
 padding: 0;
 }
}

.av-btn.mud-button-root {
 height: 36px;
 padding: 0 20px;
 border-radius: 8px;
 font-family: var(--font-sans);
 font-size: 13px;
 font-weight: 500;
 letter-spacing: 0.01em;
 text-transform: none;
 box-shadow: none !important;
 gap: 6px;
 white-space: nowrap;
}

.av-btn .mud-button-label {
 text-transform: none !important;
}

.av-btn.mud-button-root:hover,
.av-btn.mud-button-root:focus,
.av-btn.mud-button-root:focus-visible,
.av-btn.mud-button-root:active {
 box-shadow: none !important;
}

.av-btn--filled.mud-button-root {
 background: var(--color-primary-600) !important;
 color: var(--color-white) !important;
 border: 1px solid var(--color-primary-600) !important;
}

.av-btn--filled.mud-button-root:hover {
 background: var(--color-primary-700) !important;
 border-color: var(--color-primary-700) !important;
}

.av-btn--outline.mud-button-root {
 background: transparent !important;
 border: 1px solid var(--color-gray-300) !important;
 color: var(--color-gray-700) !important;
}

.av-btn--outline.mud-button-root:hover {
 background: var(--color-gray-100) !important;
 border-color: var(--color-gray-400) !important;
}

html.dark .av-btn--outline.mud-button-root {
 border-color: var(--color-dark-400) !important;
 color: var(--color-dark-100) !important;
}

html.dark .av-btn--outline.mud-button-root:hover {
 background: var(--color-dark-600) !important;
}

.av-btn--ghost.mud-button-root {
 background: transparent !important;
 border: 1px solid transparent !important;
 color: var(--color-gray-700) !important;
}

.av-btn--ghost.mud-button-root:hover {
 background: var(--color-gray-100) !important;
}

html.dark .av-btn--ghost.mud-button-root {
 color: var(--color-dark-100) !important;
}

html.dark .av-btn--ghost.mud-button-root:hover {
 background: var(--color-dark-600) !important;
}

.av-btn--danger.av-btn--filled.mud-button-root {
 background: var(--color-error) !important;
 border-color: var(--color-error) !important;
}

.av-btn--danger.av-btn--filled.mud-button-root:hover {
 background: var(--color-error-darker) !important;
 border-color: var(--color-error-darker) !important;
}

.av-btn--danger.av-btn--outline.mud-button-root,
.av-btn--danger.av-btn--ghost.mud-button-root {
 color: var(--color-error) !important;
}

.av-btn--danger.av-btn--outline.mud-button-root {
 border-color: rgb(from var(--color-error) r g b / 0.50) !important;
}

.av-btn--pill.mud-button-root {
 min-width: 7rem;
 padding: 0 18px;
 border-radius: 9999px !important;
}

/* Sizes — ladder Guía Visual completa (xs / sm / default / lg / xl). El default
 vive en .av-btn.mud-button-root (36px / 13px). Los modifiers --xs y --xl
 extienden el ladder al rango extremo del demo Guía Visual (ButtonSize). */

.av-btn--xs.mud-button-root {
 height: 24px;
 padding: 0 10px;
 font-size: 11px;
}

.av-btn--sm.mud-button-root {
 height: 30px;
 padding: 0 12px;
 font-size: 12px;
}

.av-btn--lg.mud-button-root {
 height: 42px;
 padding: 0 22px;
 font-size: 14px;
}

.av-btn--xl.mud-button-root {
 height: 52px;
 padding: 0 28px;
 font-size: 16px;
}

.av-btn.mud-button-root.mud-button-disabled,
.av-btn.mud-button-root[disabled] {
 opacity: 0.7;
 pointer-events: none;
}

.av-btn__text.mud-typography {
 font-family: inherit;
 font-size: inherit;
 font-weight: inherit;
 letter-spacing: inherit;
 line-height: 1;
 color: inherit;
 text-transform: none;
}

.av-btn__spinner.mud-progress-circular {
 width: 16px !important;
 height: 16px !important;
 margin-right: 4px;
}


/* — av-btn extended modifiers (Guía Visual variants soft / bordered / glow /
 gradient / outlined-gradient / group / segment). Todos opt-in, scope
 restringido a .av-btn-X o composiciones explicitas con .mud-button-root.
 Pixel-perfect contra demo Guía Visual components/button/. */

/* — Soft color variant (Guía Visual variant="soft") — — — — — — — — — — — — */

.av-btn-soft.mud-button-root {
 background-color: rgb(from var(--color-gray-700) r g b / 0.08) !important;
 color: var(--color-gray-700) !important;
 border: 0 !important;
 box-shadow: none !important;
}
.av-btn-soft.mud-button-root:hover {
 background-color: rgb(from var(--color-gray-700) r g b / 0.15) !important;
}
.av-btn-soft.av-btn-soft-primary.mud-button-root {
 background-color: rgb(from var(--color-primary-700) r g b / 0.10) !important;
 color: var(--color-primary-700) !important;
}
.av-btn-soft.av-btn-soft-primary.mud-button-root:hover {
 background-color: rgb(from var(--color-primary-700) r g b / 0.18) !important;
}
.av-btn-soft.av-btn-soft-secondary.mud-button-root {
 background-color: rgb(from var(--color-secondary) r g b / 0.12) !important;
 color: var(--color-secondary) !important;
}
.av-btn-soft.av-btn-soft-secondary.mud-button-root:hover {
 background-color: rgb(from var(--color-secondary) r g b / 0.20) !important;
}
.av-btn-soft.av-btn-soft-info.mud-button-root {
 background-color: rgb(from var(--color-info) r g b / 0.12) !important;
 color: var(--color-info) !important;
}
.av-btn-soft.av-btn-soft-info.mud-button-root:hover {
 background-color: rgb(from var(--color-info) r g b / 0.20) !important;
}
.av-btn-soft.av-btn-soft-success.mud-button-root {
 background-color: rgb(from var(--color-success) r g b / 0.12) !important;
 color: var(--color-success) !important;
}
.av-btn-soft.av-btn-soft-success.mud-button-root:hover {
 background-color: rgb(from var(--color-success) r g b / 0.20) !important;
}
.av-btn-soft.av-btn-soft-warning.mud-button-root {
 background-color: rgb(from var(--color-warning) r g b / 0.12) !important;
 color: var(--color-warning) !important;
}
.av-btn-soft.av-btn-soft-warning.mud-button-root:hover {
 background-color: rgb(from var(--color-warning) r g b / 0.20) !important;
}
.av-btn-soft.av-btn-soft-error.mud-button-root {
 background-color: rgb(from var(--color-error) r g b / 0.12) !important;
 color: var(--color-error) !important;
}
.av-btn-soft.av-btn-soft-error.mud-button-root:hover {
 background-color: rgb(from var(--color-error) r g b / 0.20) !important;
}

html.dark .av-btn-soft.mud-button-root {
 background-color: rgb(from var(--color-gray-300) r g b / 0.12) !important;
 color: var(--color-dark-100) !important;
}
html.dark .av-btn-soft.av-btn-soft-primary.mud-button-root { background-color: rgb(from var(--color-primary-400) r g b / 0.18) !important; color: var(--color-primary-300) !important; }
html.dark .av-btn-soft.av-btn-soft-secondary.mud-button-root { background-color: rgb(from var(--color-secondary) r g b / 0.22) !important; }
html.dark .av-btn-soft.av-btn-soft-info.mud-button-root { background-color: rgb(from var(--color-info) r g b / 0.22) !important; }
html.dark .av-btn-soft.av-btn-soft-success.mud-button-root { background-color: rgb(from var(--color-success) r g b / 0.22) !important; }
html.dark .av-btn-soft.av-btn-soft-warning.mud-button-root { background-color: rgb(from var(--color-warning) r g b / 0.22) !important; }
html.dark .av-btn-soft.av-btn-soft-error.mud-button-root { background-color: rgb(from var(--color-error) r g b / 0.22) !important; }

/* — Bordered modifier (additive on soft, Guía Visual SoftBordered) — — — — — */

.av-btn-soft.av-btn-bordered.mud-button-root {
 border: 1px solid rgb(from var(--color-gray-700) r g b / 0.30) !important;
}
.av-btn-soft.av-btn-bordered.av-btn-soft-primary.mud-button-root { border-color: rgb(from var(--color-primary-700) r g b / 0.40) !important; }
.av-btn-soft.av-btn-bordered.av-btn-soft-secondary.mud-button-root { border-color: rgb(from var(--color-secondary) r g b / 0.40) !important; }
.av-btn-soft.av-btn-bordered.av-btn-soft-info.mud-button-root { border-color: rgb(from var(--color-info) r g b / 0.40) !important; }
.av-btn-soft.av-btn-bordered.av-btn-soft-success.mud-button-root { border-color: rgb(from var(--color-success) r g b / 0.40) !important; }
.av-btn-soft.av-btn-bordered.av-btn-soft-warning.mud-button-root { border-color: rgb(from var(--color-warning) r g b / 0.40) !important; }
.av-btn-soft.av-btn-bordered.av-btn-soft-error.mud-button-root { border-color: rgb(from var(--color-error) r g b / 0.40) !important; }

html.dark .av-btn-soft.av-btn-bordered.mud-button-root { border-color: rgb(from var(--color-gray-300) r g b / 0.30) !important; }

/* — Glow modifier (halo box-shadow per color — Guía Visual isGlow) — — — — — */

.av-btn-glow.mud-button-root { box-shadow: 0 8px 24px rgb(from var(--color-gray-500) r g b / 0.40) !important; }
.av-btn-glow-primary.mud-button-root { box-shadow: 0 8px 24px rgb(from var(--color-primary-500) r g b / 0.50) !important; }
.av-btn-glow-secondary.mud-button-root { box-shadow: 0 8px 24px rgb(from var(--color-secondary) r g b / 0.50) !important; }
.av-btn-glow-info.mud-button-root { box-shadow: 0 8px 24px rgb(from var(--color-info) r g b / 0.50) !important; }
.av-btn-glow-success.mud-button-root { box-shadow: 0 8px 24px rgb(from var(--color-success) r g b / 0.50) !important; }
.av-btn-glow-warning.mud-button-root { box-shadow: 0 8px 24px rgb(from var(--color-warning) r g b / 0.50) !important; }
.av-btn-glow-error.mud-button-root { box-shadow: 0 8px 24px rgb(from var(--color-error) r g b / 0.50) !important; }

/* — Gradient bg variants (Guía Visual Gradient — 6 paletas) — — — — — — — — */

/* Doble selector (plain + compound .mud-button-root) para que las gradient
 classes funcionen tanto en MudButton como en <button> nativo (caso del
 wrapper de Outlined Gradient — av-btn-outlined-gradient-wrapper). */

.av-btn-gradient-fuchsia-pink,
.av-btn-gradient-fuchsia-pink.mud-button-root { background: linear-gradient(to right, #c026d3, #db2777) !important; color: var(--color-white) !important; }
.av-btn-gradient-purple-indigo,
.av-btn-gradient-purple-indigo.mud-button-root { background: linear-gradient(to bottom right, #a855f7, #4f46e5) !important; color: var(--color-white) !important; }
.av-btn-gradient-sky-blue,
.av-btn-gradient-sky-blue.mud-button-root { background: linear-gradient(to right, #38bdf8, #2563eb) !important; color: var(--color-white) !important; }
.av-btn-gradient-amber-orange,
.av-btn-gradient-amber-orange.mud-button-root { background: linear-gradient(to right, #fbbf24, #ea580c) !important; color: var(--color-white) !important; }
.av-btn-gradient-pink-indigo,
.av-btn-gradient-pink-indigo.mud-button-root { background: linear-gradient(to left, #f9a8d4, #818cf8) !important; color: var(--color-white) !important; }
.av-btn-gradient-green-blue,
.av-btn-gradient-green-blue.mud-button-root { background: linear-gradient(to right, #4ade80, #2563eb) !important; color: var(--color-white) !important; }

.av-btn-gradient-fuchsia-pink.mud-button-root:hover,
.av-btn-gradient-purple-indigo.mud-button-root:hover,
.av-btn-gradient-sky-blue.mud-button-root:hover,
.av-btn-gradient-amber-orange.mud-button-root:hover,
.av-btn-gradient-pink-indigo.mud-button-root:hover,
.av-btn-gradient-green-blue.mud-button-root:hover {
 opacity: 0.85;
}

/* — Outlined Gradient wrapper pattern — — — — — — — — — — — — — — — — */

.av-btn-outlined-gradient-wrapper {
 display: inline-flex;
 height: 40px;
 padding: 2px;
 border: 0;
 border-radius: 8px;
 cursor: pointer;
 transition: transform 100ms ease-out;
 font: inherit;
}
.av-btn-outlined-gradient-wrapper:active {
 transform: translateY(1px);
}

.av-btn-outlined-gradient-inner {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 height: 100%;
 padding: 0 20px;
 border-radius: 6px;
 background-color: var(--color-white);
 color: var(--color-gray-800);
 transition: background-color 150ms ease, color 150ms ease;
 font-size: 13px;
 font-weight: 500;
}

.av-btn-outlined-gradient-wrapper:hover .av-btn-outlined-gradient-inner,
.av-btn-outlined-gradient-wrapper:focus-within .av-btn-outlined-gradient-inner {
 background-color: transparent;
 color: var(--color-white);
}

html.dark .av-btn-outlined-gradient-inner {
 background-color: var(--color-dark-700);
 color: var(--color-dark-100);
}

/* — Button Group (Guía Visual ButtonGroup — flex con bordes mergeados) — — — */

.av-btn-group {
 display: inline-flex;
 flex-wrap: wrap;
}
.av-btn-group > .mud-button-root:not(:first-child) {
 margin-inline-start: -1px !important;
 border-top-left-radius: 0 !important;
 border-bottom-left-radius: 0 !important;
}
.av-btn-group > .mud-button-root:not(:last-child) {
 border-top-right-radius: 0 !important;
 border-bottom-right-radius: 0 !important;
}

/* — Segment Buttons (Guía Visual Segment — toggle group con checked) — — — — */

.av-btn-segment {
 display: inline-flex;
 flex-wrap: wrap;
}

/* Doble target — MudButton (.mud-button-root) y MudIconButton
 (.mud-icon-button-root). Specificity 0,3,0 (con :not(.mud-fab)) para
 batirle a mud-bridge.css §62 que pinta var(--radius-lg) sobre todo
 MudButton. */
.av-btn-segment > .mud-button-root:not(.mud-fab),
.av-btn-segment > .mud-icon-button-root {
 border-radius: 0 !important;
 border: 1px solid var(--color-gray-300) !important;
 background-color: transparent !important;
 color: var(--color-gray-800) !important;
 margin-inline-start: -1px !important;
}
.av-btn-segment > .mud-button-root:not(.mud-fab):first-child,
.av-btn-segment > .mud-icon-button-root:first-child {
 margin-inline-start: 0 !important;
 border-top-left-radius: 8px !important;
 border-bottom-left-radius: 8px !important;
}
.av-btn-segment > .mud-button-root:not(.mud-fab):last-child,
.av-btn-segment > .mud-icon-button-root:last-child {
 border-top-right-radius: 8px !important;
 border-bottom-right-radius: 8px !important;
}
.av-btn-segment > .mud-button-root.av-segment-active,
.av-btn-segment > .mud-icon-button-root.av-segment-active {
 background-color: var(--color-gray-200) !important;
}

html.dark .av-btn-segment > .mud-button-root:not(.mud-fab),
html.dark .av-btn-segment > .mud-icon-button-root {
 border-color: var(--color-dark-500) !important;
 color: var(--color-dark-100) !important;
}
html.dark .av-btn-segment > .mud-button-root.av-segment-active,
html.dark .av-btn-segment > .mud-icon-button-root.av-segment-active {
 background-color: var(--color-dark-500) !important;
}

/* — Color chain `av-color-X` + variantes consumidoras (filled/outlined/flat)
 Replica el patrón `setThisClass` + `bg-this`/`text-this-darker` del demo
 Guía Visual (components/ui/Button/index.jsx §variants). El color modifier setea
 los tokens --av-this / --av-this-darker / --av-this-lighter / --av-this-light
 sobre el botón; la variante los consume.

 Diferencia con `Color="Color.X"` de MudBlazor: aquellos pintan con la
 paleta MudTheme (que no matchea Guía Visual para Secondary/Info/etc.). Estos
 pintan con los tokens semánticos del proyecto (--color-secondary = #e000ad,
 --color-info = sky-600, etc., declarados en design-tokens.css §A).

 Opt-in al 100 %: producción sigue intacta con `Color="Color.Primary"`
 etc. Estas clases son para showcases pixel-perfect y nuevos usos donde
 el equipo quiera la paleta saturada Guía Visual. */

.av-color-primary {
 --av-this: var(--color-primary-600);
 --av-this-darker: var(--color-primary-700);
 --av-this-lighter: var(--color-primary-400);
 --av-this-light: var(--color-primary-500);
}
.av-color-secondary {
 --av-this: var(--color-secondary);
 --av-this-darker: var(--color-secondary-darker);
 --av-this-lighter: var(--color-secondary-lighter);
 --av-this-light: var(--color-secondary-light);
}
.av-color-info {
 --av-this: var(--color-info);
 --av-this-darker: var(--color-info-darker);
 --av-this-lighter: var(--color-info-lighter);
 --av-this-light: var(--color-info-light);
}
.av-color-success {
 --av-this: var(--color-success);
 --av-this-darker: var(--color-success-darker);
 --av-this-lighter: var(--color-success-lighter);
 --av-this-light: var(--color-success-light);
}
.av-color-warning {
 --av-this: var(--color-warning);
 --av-this-darker: var(--color-warning-darker);
 --av-this-lighter: var(--color-warning-lighter);
 --av-this-light: var(--color-warning-light);
}
.av-color-error {
 --av-this: var(--color-error);
 --av-this-darker: var(--color-error-darker);
 --av-this-lighter: var(--color-error-lighter);
 --av-this-light: var(--color-error-light);
}

/* — av-btn-filled — bg-this + text-white + hover bg-this-darker.
 Aplica a MudButton y MudIconButton. Cuando no hay av-color-X, cae al
 neutralVariants.filled de Guía Visual (gray-150 bg + gray-900 text). */

.av-btn-filled.mud-button-root,
.av-btn-filled.mud-icon-button-root {
 background-color: var(--av-this, var(--color-gray-150)) !important;
 color: var(--color-white) !important;
 border: 1px solid var(--av-this, var(--color-gray-150)) !important;
}
.av-btn-filled.mud-button-root:hover,
.av-btn-filled.mud-icon-button-root:hover {
 background-color: var(--av-this-darker, var(--color-gray-200)) !important;
 border-color: var(--av-this-darker, var(--color-gray-200)) !important;
}

/* Neutral fallback — sin av-color-X. text gray-900 (no white). */
.av-btn-filled:not([class*="av-color-"]).mud-button-root,
.av-btn-filled:not([class*="av-color-"]).mud-icon-button-root {
 color: var(--color-gray-900) !important;
 border-color: transparent !important;
}
html.dark .av-btn-filled:not([class*="av-color-"]).mud-button-root,
html.dark .av-btn-filled:not([class*="av-color-"]).mud-icon-button-root {
 background-color: var(--color-dark-500) !important;
 color: var(--color-dark-50) !important;
}
html.dark .av-btn-filled:not([class*="av-color-"]).mud-button-root:hover,
html.dark .av-btn-filled:not([class*="av-color-"]).mud-icon-button-root:hover {
 background-color: var(--color-dark-400) !important;
}

/* — av-btn-outlined — border + text-this-darker (light mode) o
 text-this-lighter (dark mode). hover bg-this-darker/[.05]. */

.av-btn-outlined.mud-button-root,
.av-btn-outlined.mud-icon-button-root {
 background-color: transparent !important;
 color: var(--av-this-darker, var(--color-gray-900)) !important;
 border: 1px solid var(--av-this-darker, var(--color-gray-300)) !important;
}
.av-btn-outlined.mud-button-root:hover,
.av-btn-outlined.mud-icon-button-root:hover {
 background-color: rgb(from var(--av-this-darker, var(--color-gray-300)) r g b / 0.05) !important;
}
html.dark .av-btn-outlined.mud-button-root,
html.dark .av-btn-outlined.mud-icon-button-root {
 color: var(--av-this-lighter, var(--color-dark-50)) !important;
 border-color: var(--av-this-lighter, var(--color-dark-450)) !important;
}
html.dark .av-btn-outlined.mud-button-root:hover,
html.dark .av-btn-outlined.mud-icon-button-root:hover {
 background-color: rgb(from var(--av-this-lighter, var(--color-dark-300)) r g b / 0.05) !important;
}

/* — av-btn-flat — sin border. text-this-darker (light) / text-this-lighter (dark).
 hover bg-this-darker/[.08]. */

.av-btn-flat.mud-button-root,
.av-btn-flat.mud-icon-button-root {
 background-color: transparent !important;
 color: var(--av-this-darker, var(--color-gray-700)) !important;
 border: 1px solid transparent !important;
}
.av-btn-flat.mud-button-root:hover,
.av-btn-flat.mud-icon-button-root:hover {
 background-color: rgb(from var(--av-this-darker, var(--color-gray-300)) r g b / 0.08) !important;
}
html.dark .av-btn-flat.mud-button-root,
html.dark .av-btn-flat.mud-icon-button-root {
 color: var(--av-this-lighter, var(--color-dark-200)) !important;
}
html.dark .av-btn-flat.mud-button-root:hover,
html.dark .av-btn-flat.mud-icon-button-root:hover {
 background-color: rgb(from var(--av-this-lighter, var(--color-dark-300)) r g b / 0.10) !important;
}

/* — Disabled state — Guía Visual pattern (opt-in via .av-btn-disabled-colored)
 Mud default reemplaza el bg saturado por gray-tint cuando disabled.
 Guía Visual preserva el color saturado pero baja opacity al 50%. Opt-in
 por clase para evitar cambiar el comportamiento de todos los MudButton
 disabled de producción (Save buttons, etc.). */

.av-btn-disabled-colored.mud-button-root.mud-disabled,
.av-btn-disabled-colored.mud-button-root[disabled],
.av-btn-disabled-colored.mud-icon-button-root.mud-disabled,
.av-btn-disabled-colored.mud-icon-button-root[disabled] {
 opacity: 0.5 !important;
}

.av-card.mud-paper {
 background: var(--color-white);
 border: 1px solid var(--color-gray-200);
 border-radius: 12px;
 box-shadow:
 rgba(145, 158, 171, 0.20) 0 0 2px 0,
 rgba(145, 158, 171, 0.12) 0 12px 24px -4px;
}

html.dark .av-card.mud-paper {
 background: var(--color-dark-700);
 border-color: var(--color-dark-500);
 box-shadow:
 rgb(0 0 0 / 0.20) 0 0 2px 0,
 rgb(0 0 0 / 0.40) 0 12px 24px -4px;
}

.av-card--flat.mud-paper {
 box-shadow: none;
}

.av-card--bordered.mud-paper {
 box-shadow: none;
 border-width: 1px;
}

.av-chip {
 display: inline-flex;
 align-items: center;
 gap: 6px;
 padding: 4px 10px;
 border-radius: 9999px;
 border: 1px solid transparent;
 width: fit-content;
 line-height: 1;
}

.av-chip__icon.mud-icon-root {
 width: 14px;
 height: 14px;
 font-size: 14px;
}

.av-chip__text.mud-typography {
 color: inherit;
}

.av-chip--success {
 background: rgb(from var(--color-success) r g b / 0.12);
 color: var(--color-success-darker);
 border-color: rgb(from var(--color-success) r g b / 0.25);
}

html.dark .av-chip--success {
 background: rgb(from var(--color-success) r g b / 0.18);
 color: var(--color-success-light);
 border-color: rgb(from var(--color-success) r g b / 0.35);
}

.av-chip--warning {
 background: rgb(from var(--color-warning) r g b / 0.12);
 color: var(--color-warning-darker);
 border-color: rgb(from var(--color-warning) r g b / 0.25);
}

html.dark .av-chip--warning {
 background: rgb(from var(--color-warning) r g b / 0.18);
 color: var(--color-warning-light);
 border-color: rgb(from var(--color-warning) r g b / 0.35);
}

.av-chip--danger {
 background: rgb(from var(--color-error) r g b / 0.12);
 color: var(--color-error-darker);
 border-color: rgb(from var(--color-error) r g b / 0.25);
}

html.dark .av-chip--danger {
 background: rgb(from var(--color-error) r g b / 0.18);
 color: var(--color-error-light);
 border-color: rgb(from var(--color-error) r g b / 0.35);
}

.av-chip--neutral {
 background: var(--color-gray-100);
 color: var(--color-gray-600);
 border-color: var(--color-gray-200);
}

html.dark .av-chip--neutral {
 background: rgb(from var(--color-dark-500) r g b / 0.40);
 color: var(--color-dark-200);
 border-color: var(--color-dark-500);
}

/* Tailux info recipe — `bg-this-darker/10 text-this-darker` light,
   flip to `lighter` ramp in dark mode. Matches `.av-address-form__notice`. */
.av-chip--info {
    background: rgb(from var(--color-info-darker) r g b / 0.10);
    color: var(--color-info-darker);
    border-color: rgb(from var(--color-info-darker) r g b / 0.22);
}

html.dark .av-chip--info {
    background: rgb(from var(--color-info-lighter) r g b / 0.10);
    color: var(--color-info-lighter);
    border-color: rgb(from var(--color-info-lighter) r g b / 0.30);
}

.av-chip--lg {
 padding: 6px 12px;
}

.av-avatar.mud-avatar {
 background: rgb(from var(--color-primary-600) r g b / 0.10);
 color: var(--color-primary-700);
 font-family: var(--font-sans);
 font-weight: 600;
 font-size: 13px;
 width: 36px;
 height: 36px;
 border: none;
 text-transform: uppercase;
 letter-spacing: 0.02em;
 display: inline-flex;
 align-items: center;
 justify-content: center;
}

html.dark .av-avatar.mud-avatar {
 background: rgb(from var(--color-primary-400) r g b / 0.18);
 color: var(--color-primary-300);
}

/* Semantic color modifiers (Guía Visual InitialSoft — 5 colores extra del primary).
 El default .av-avatar ya cubre primary; estos agregan secondary/info/success/
 warning/error con el mismo patrón (10% bg + color para texto). */

.av-avatar.av-avatar-secondary.mud-avatar {
 background: rgb(from var(--color-secondary) r g b / 0.12);
 color: var(--color-secondary);
}
.av-avatar.av-avatar-info.mud-avatar {
 background: rgb(from var(--color-info) r g b / 0.12);
 color: var(--color-info);
}
.av-avatar.av-avatar-success.mud-avatar {
 background: rgb(from var(--color-success) r g b / 0.12);
 color: var(--color-success);
}
.av-avatar.av-avatar-warning.mud-avatar {
 background: rgb(from var(--color-warning) r g b / 0.12);
 color: var(--color-warning);
}
.av-avatar.av-avatar-error.mud-avatar {
 background: rgb(from var(--color-error) r g b / 0.12);
 color: var(--color-error);
}

html.dark .av-avatar.av-avatar-secondary.mud-avatar { background: rgb(from var(--color-secondary) r g b / 0.20); color: var(--color-secondary-light); }
html.dark .av-avatar.av-avatar-info.mud-avatar { background: rgb(from var(--color-info) r g b / 0.20); color: var(--color-info-light); }
html.dark .av-avatar.av-avatar-success.mud-avatar { background: rgb(from var(--color-success) r g b / 0.20); color: var(--color-success-light); }
html.dark .av-avatar.av-avatar-warning.mud-avatar { background: rgb(from var(--color-warning) r g b / 0.20); color: var(--color-warning-light); }
html.dark .av-avatar.av-avatar-error.mud-avatar { background: rgb(from var(--color-error) r g b / 0.20); color: var(--color-error-light); }

/* Bordered modifier — agrega un border 1px del mismo color al ~20% opacity.
 Replica el patrón Guía Visual InitialSoftBordered (border border-this-darker/20). */

.av-avatar.av-avatar-bordered.mud-avatar {
 border: 1px solid rgb(from var(--color-primary-700) r g b / 0.20);
}
.av-avatar.av-avatar-bordered.av-avatar-secondary.mud-avatar { border-color: rgb(from var(--color-secondary) r g b / 0.30); }
.av-avatar.av-avatar-bordered.av-avatar-info.mud-avatar { border-color: rgb(from var(--color-info) r g b / 0.30); }
.av-avatar.av-avatar-bordered.av-avatar-success.mud-avatar { border-color: rgb(from var(--color-success) r g b / 0.30); }
.av-avatar.av-avatar-bordered.av-avatar-warning.mud-avatar { border-color: rgb(from var(--color-warning) r g b / 0.30); }
.av-avatar.av-avatar-bordered.av-avatar-error.mud-avatar { border-color: rgb(from var(--color-error) r g b / 0.30); }

html.dark .av-avatar.av-avatar-bordered.mud-avatar { border-color: rgb(from var(--color-primary-300) r g b / 0.25); }

.av-avatar--sm.mud-avatar {
 width: 28px;
 height: 28px;
 font-size: 11px;
}

.av-avatar--lg.mud-avatar {
 width: 44px;
 height: 44px;
 font-size: 15px;
}

/* Color variants for initials avatars in tables. Strong pattern (Guía Visual parity):
 color-500 saturated background + white text. High contrast — initials always
 legible regardless of name length or zoom level. */

.av-avatar.avatar-pink.mud-avatar { background: var(--color-rose-500); color: var(--color-white); }
.av-avatar.avatar-blue.mud-avatar { background: var(--color-blue-500); color: var(--color-white); }
.av-avatar.avatar-green.mud-avatar { background: var(--color-emerald-500); color: var(--color-white); }
.av-avatar.avatar-purple.mud-avatar { background: var(--color-violet-500); color: var(--color-white); }
.av-avatar.avatar-orange.mud-avatar { background: var(--color-amber-500); color: var(--color-white); }
.av-avatar.avatar-teal.mud-avatar { background: var(--color-teal-500); color: var(--color-white); }

html.dark .av-avatar.avatar-pink.mud-avatar { background: var(--color-rose-400); color: var(--color-white); }
html.dark .av-avatar.avatar-blue.mud-avatar { background: var(--color-blue-400); color: var(--color-white); }
html.dark .av-avatar.avatar-green.mud-avatar { background: var(--color-emerald-400); color: var(--color-white); }
html.dark .av-avatar.avatar-purple.mud-avatar { background: var(--color-violet-400); color: var(--color-white); }
html.dark .av-avatar.avatar-orange.mud-avatar { background: var(--color-amber-400); color: var(--color-white); }
html.dark .av-avatar.avatar-teal.mud-avatar { background: var(--color-teal-400); color: var(--color-white); }

/* View dropdown — table view options menu (Guía Visual TableSettings parity).
 Triggered by the "View" button in the toolbar; contains a Row Dense toggle,
 a column visibility checklist (overline label with horizontal divider line),
 and a full-width "Show All Columns" action button with a top border. */

.av-view-menu.mud-popover {
 min-width: 260px;
 max-width: 320px;
 border-radius: var(--radius-md);
 padding: 0;
 box-shadow: 0 4px 16px rgb(from var(--color-gray-900) r g b / 0.10);
 background: var(--color-white);
 border: 1px solid var(--color-gray-200);
 overflow: hidden;
}

html.dark .av-view-menu.mud-popover {
 background: var(--color-dark-700);
 border-color: var(--color-dark-500);
 box-shadow: 0 4px 16px rgb(0 0 0 / 0.30);
}

.av-view-menu__inner {
 display: flex;
 flex-direction: column;
}

.av-view-menu__title.mud-typography {
 color: var(--color-gray-900);
 padding: 12px 12px 4px;
 font-weight: 600;
}

html.dark .av-view-menu__title.mud-typography {
 color: var(--color-dark-50);
}

/* Switches stack with consistent left padding */
.av-view-menu__inner > .mud-switch {
 padding: 6px 12px;
}

/* MudSwitch label renders as a single span carrying both .mud-switch and
   .mud-typography classes on the SAME element (not parent/child), so the
   selector combines them without a space. */
.av-view-menu .mud-switch.mud-typography {
    color: var(--color-gray-700);
}

html.dark .av-view-menu .mud-switch.mud-typography {
    color: var(--color-dark-100);
}

/* COLUMN VISIBILITY label + horizontal divider line (matches Guía Visual <hr> pattern) */
.av-view-menu__section-divider {
 display: flex;
 align-items: center;
 gap: 8px;
 padding: 12px 12px 4px;
}

.av-view-menu__section.mud-typography {
 color: var(--color-gray-500);
 text-transform: uppercase;
 letter-spacing: 0.04em;
 font-size: 11px;
 font-weight: 600;
 white-space: nowrap;
}

html.dark .av-view-menu__section.mud-typography {
 color: var(--color-dark-300);
}

.av-view-menu__hr {
 flex: 1 1 auto;
 height: 1px;
 border: none;
 background: var(--color-gray-300);
 margin: 0;
}

html.dark .av-view-menu__hr {
 background: var(--color-dark-500);
}

.av-view-menu__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 12px;
    max-height: 50vh;
    overflow-y: auto;
}

/* Give each column-visibility checkbox row a touch of internal padding so
   the click area is comfortable AND the label has space from the row above
   without depending solely on the parent `gap`. */
.av-view-menu__list .mud-checkbox {
    padding: 2px 0;
}

/* Match the filter popover item typography (.av-filter-popover__item-name):
   13 px / 400 / gray-800. Applied to the Switch labels (Full Screen, Row Dense)
   and to the column-visibility Checkbox labels so the View menu reads with the
   same letter as the Filter menu. */
.av-view-menu__inner .mud-switch .mud-typography,
.av-view-menu__list .mud-checkbox .mud-typography {
    font-size: var(--text-xs-plus);
    font-weight: 400;
    color: var(--color-gray-800);
}

html.dark .av-view-menu__inner .mud-switch .mud-typography,
html.dark .av-view-menu__list .mud-checkbox .mud-typography {
    color: var(--color-dark-100);
}

/* Show All Columns — botón outlined inset (no edge-to-edge), auto-sized al
 contenido y centrado horizontalmente. width:auto + align-self:center batean
 el FullWidth="true" del MudButton (que aplica width:100%) que combinado con
 las márgenes laterales producía un scroll horizontal en el popover. */
.av-view-menu__action.mud-button-root {
 width: auto;
 align-self: center;
 height: 32px;
 text-transform: none;
 letter-spacing: 0;
 border-radius: var(--radius-md);
 color: var(--color-gray-700);
 font-weight: 500;
 background: transparent;
 box-shadow: none;
 border: 1px solid var(--color-gray-300);
 margin: 8px 0 12px;
 padding: 0 16px;
 font-size: var(--text-xs-plus);
}

.av-view-menu__action.mud-button-root:hover {
 background: var(--color-gray-100);
 border-color: var(--color-gray-400);
}

html.dark .av-view-menu__action.mud-button-root {
 color: var(--color-dark-100);
 border-color: var(--color-dark-500);
}

html.dark .av-view-menu__action.mud-button-root:hover {
 background: var(--color-dark-600);
 border-color: var(--color-dark-400);
}

.av-section-title.mud-typography {
 margin: 0 0 16px;
 color: var(--color-gray-800);
}

html.dark .av-section-title.mud-typography {
 color: var(--color-dark-100);
}

.av-info-section__header .av-section-title.mud-typography {
 margin: 0;
}

.av-empty,
.av-empty.mud-typography {
 color: var(--color-gray-400);
 font-style: italic;
 font-weight: 400;
}

html.dark .av-empty,
html.dark .av-empty.mud-typography {
 color: var(--color-dark-400);
}

.av-info-section.mud-paper {
 padding: 16px 20px;
 margin-bottom: 16px;
}

.av-info-section__header {
 margin-bottom: 16px;
 width: 100%;
}

.av-info-section__body.mud-grid {
 margin: 0;
 width: 100%;
}

.av-info-field {
 min-width: 0;
}

.av-info-field__label.mud-typography {
 color: var(--color-gray-500);
}

html.dark .av-info-field__label.mud-typography {
 color: var(--color-dark-300);
}

.av-info-field__value.mud-typography {
 color: var(--color-gray-800);
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}

html.dark .av-info-field__value.mud-typography {
 color: var(--color-dark-100);
}

.av-info-section__group + .av-info-section__group {
 margin-top: 20px;
}

.av-info-section__group--secondary {
 padding-top: 20px;
 border-top: 1px dashed var(--color-gray-200);
}

html.dark .av-info-section__group--secondary {
 border-top-color: var(--color-dark-500);
}

.av-info-section__subheader.mud-typography {
 display: block;
 margin: 0 0 12px;
 color: var(--color-gray-500);
}

html.dark .av-info-section__subheader.mud-typography {
 color: var(--color-dark-300);
}

/* ── av-info-list — pretty row list inside an .av-info-section ────────────
   For repeating items (emails, phones, addresses) when a flat field grid
   isn't the right shape. Each item is an icon disc + primary text + meta
   below + optional state chip on the right. The hover lift is subtle so
   the section reads as a list, not a clickable card grid. */
.av-info-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.av-info-list__item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: var(--color-gray-100);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    transition: background-color 150ms ease, border-color 150ms ease;
}

.av-info-list__item:hover {
    background: var(--color-gray-50);
    border-color: var(--color-gray-200);
}

html.dark .av-info-list__item {
    background: var(--color-dark-700);
}

html.dark .av-info-list__item:hover {
    background: var(--color-dark-600);
    border-color: var(--color-dark-500);
}

/* Primary item — tinted with the brand primary; reads as the "default"
   row of the list. */
.av-info-list__item--primary {
    background: rgb(from var(--color-primary-500) r g b / 0.06);
    border-color: rgb(from var(--color-primary-500) r g b / 0.20);
}

.av-info-list__item--primary:hover {
    background: rgb(from var(--color-primary-500) r g b / 0.10);
    border-color: rgb(from var(--color-primary-500) r g b / 0.30);
}

html.dark .av-info-list__item--primary {
    background: rgb(from var(--color-primary-400) r g b / 0.12);
    border-color: rgb(from var(--color-primary-400) r g b / 0.25);
}

html.dark .av-info-list__item--primary:hover {
    background: rgb(from var(--color-primary-400) r g b / 0.18);
    border-color: rgb(from var(--color-primary-400) r g b / 0.40);
}

/* Icon disc — 36 × 36 rounded square with neutral tint. The primary
   variant flips the icon disc to the brand primary. */
.av-info-list__icon-wrap {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-white);
    color: var(--color-gray-600);
    border: 1px solid var(--color-gray-200);
}

html.dark .av-info-list__icon-wrap {
    background: var(--color-dark-800);
    color: var(--color-dark-200);
    border-color: var(--color-dark-500);
}

.av-info-list__item--primary .av-info-list__icon-wrap {
    background: var(--color-primary-600);
    color: var(--color-white);
    border-color: var(--color-primary-600);
}

html.dark .av-info-list__item--primary .av-info-list__icon-wrap {
    background: var(--color-primary-400);
    border-color: var(--color-primary-400);
}

.av-info-list__icon-wrap .mud-icon-root {
    width: 18px !important;
    height: 18px !important;
    font-size: 18px !important;
}

/* Text column — primary value above, meta caption below. min-width:0 so
   long emails truncate via ellipsis instead of overflowing the row. */
.av-info-list__content {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.av-info-list__value.mud-typography {
    color: var(--color-gray-900);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html.dark .av-info-list__value.mud-typography {
    color: var(--color-dark-50);
}

/* Extension suffix that sits inline after the phone number — same line,
   slightly faded so it reads as a secondary detail without breaking the
   visual rhythm of the primary number. */
.av-info-list__extension.mud-typography {
    color: var(--color-gray-500);
    margin-left: 2px;
}

html.dark .av-info-list__extension.mud-typography {
    color: var(--color-dark-300);
}

/* Allow multi-line wrap for content that can legitimately span 2+ lines
   (addresses with a long street + city/state/zip footer). Drops the
   single-line ellipsis clamp set above. */
.av-info-list__item--wrap .av-info-list__value.mud-typography,
.av-info-list__item--wrap .av-info-list__meta.mud-typography {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.av-info-list__meta.mud-typography {
    color: var(--color-gray-500);
    text-transform: capitalize;
}

html.dark .av-info-list__meta.mud-typography {
    color: var(--color-dark-300);
}


/* ── av-address-form ─────────────────────────────────────────────────────
   Skin for the shared `AddressForm` component (Shared/AddressForm.razor).
   The component renders inside any consumer surface (dialog body, page
   tab, section); this skin only owns the bits the form itself paints:
   status chip row, foreign notice spacing, search toggle bar, search
   panel, suggestions list, validation summary, row layouts, action row.
   Field rhythm comes from `.av-form-fields` (canonical 20 px gap). */

.av-address-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 10px;
}

.av-address-form__status {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

/* Foreign-address info banner — Tailux info-alert pattern.
   Light: 10 % tint of --color-info-darker on bg + same color on text/icon.
   Dark : 10 % tint of --color-info-lighter on bg + same color on text/icon.
   Padding 16 px on mobile, 16/20 on sm+ to match Tailux's `sm:px-5`. */
.av-address-form__notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: var(--radius-lg);
    background: rgb(from var(--color-info-darker) r g b / 0.10);
    color: var(--color-info-darker);
}

.av-address-form__notice .mud-typography {
    color: inherit;
}

.av-address-form__notice-icon {
    flex-shrink: 0;
}

html.dark .av-address-form__notice {
    background: rgb(from var(--color-info-lighter) r g b / 0.10);
    color: var(--color-info-lighter);
}

@media (min-width: 640px) {
    .av-address-form__notice {
        padding: 16px 20px;
    }
}

/* Search toggle bar — Tailux helper strip with a tinted icon disc on the
   left, hint text in the middle, primary-outlined button on the right.
   Background gray so it reads as a helper, not a form field. */
.av-address-form__search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    background: var(--color-gray-100);
}

html.dark .av-address-form__search-bar {
    background: var(--color-dark-700);
    border-color: var(--color-dark-500);
}

.av-address-form__search-bar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--color-white);
    color: var(--color-primary-600);
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
}

html.dark .av-address-form__search-bar-icon {
    background: var(--color-dark-600);
    color: var(--color-primary-400);
}

.av-address-form__search-bar-icon .mud-icon-root {
    width: 16px;
    height: 16px;
    color: inherit;
}

.av-address-form__search-bar-text.mud-typography {
    color: var(--color-gray-700);
    flex: 1 1 auto;
    min-width: 0;
}

html.dark .av-address-form__search-bar-text.mud-typography {
    color: var(--color-dark-200);
}

.av-address-form__search-toggle-btn.mud-button-root {
    flex-shrink: 0;
    text-transform: none;
    letter-spacing: 0;
    border-radius: var(--radius-full);
    padding: 4px 14px;
    min-height: 32px;
}

.av-address-form__search-toggle-btn .mud-icon-root {
    width: 14px;
    height: 14px;
}

/* Search panel — expanded section under the bar (wrapped in MudCollapse). */
.av-address-form__search-panel {
    padding: 12px 14px;
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    background: var(--color-white);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

html.dark .av-address-form__search-panel {
    background: var(--color-dark-800);
    border-color: var(--color-dark-500);
}

.av-address-form__search-helper.mud-typography {
    color: var(--color-gray-500);
}

html.dark .av-address-form__search-helper.mud-typography {
    color: var(--color-dark-300);
}

.av-address-form__search-empty.mud-typography {
    color: var(--color-gray-500);
    padding: 8px 4px;
}

html.dark .av-address-form__search-empty.mud-typography {
    color: var(--color-dark-300);
}

/* Autocomplete result row inside the MudAutocomplete dropdown. Mirrors the
   suggestion-item visual: icon disc + primary line + secondary line. */
.av-address-form__result {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
    min-width: 0;
    width: 100%;
}

.av-address-form__result-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: rgb(from var(--color-primary-500) r g b / 0.12);
    color: var(--color-primary-600);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

html.dark .av-address-form__result-icon {
    background: rgb(from var(--color-primary-400) r g b / 0.18);
    color: var(--color-primary-300);
}

.av-address-form__result.is-complete .av-address-form__result-icon {
    background: rgb(from var(--color-success) r g b / 0.14);
    color: var(--color-success);
}

.av-address-form__result-icon .mud-icon-root {
    width: 16px;
    height: 16px;
    color: inherit;
}

.av-address-form__result-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
}

.av-address-form__result-primary.mud-typography {
    color: var(--color-gray-800);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html.dark .av-address-form__result-primary.mud-typography {
    color: var(--color-dark-50);
}

.av-address-form__result-secondary.mud-typography {
    color: var(--color-gray-500);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html.dark .av-address-form__result-secondary.mud-typography {
    color: var(--color-dark-300);
}

/* Validation summary — adopted style from MudAlert outlined error. The
   bullet list inside gets list-styled normally (don't reset). */
.av-address-form__errors.mud-alert {
    margin: 0;
}

.av-address-form__error-list {
    margin: 4px 0 0;
    padding-left: 20px;
}

/* Row grid templates. Each row is a CSS grid that lays out its children
   side-by-side at desktop widths and collapses to a single column below
   640 px. Naming mirrors the col-N share of a 12-col grid. */
.av-address-form__row-6-3-3 {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 16px;
}

.av-address-form__row-6-6 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.av-address-form__row-3-9 {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 16px;
}

@media (max-width: 640px) {
    .av-address-form__row-6-3-3,
    .av-address-form__row-6-6,
    .av-address-form__row-3-9 {
        grid-template-columns: 1fr;
    }
}

/* Action row — Clear left, Save right. Uses the same canonical 12 px gap
   as `.av-form-dialog__actions` so the buttons read as part of the same
   family even when the form sits outside a dialog. */
.av-address-form__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

/* Address-edit dialog rows. The dialog hosts N editable address cards, each
   with its own avatar + type chip + actions on top, then the field grid
   below. Sits inside .av-form-fields so the 20 px vertical rhythm between
   cards comes from the form-dialog scope; this block only owns the row's
   inner padding, border and per-row grids. */
.av-address-edit__list {
    /* extends .av-form-fields — keep the 20 px row gap from the parent */
}

.av-address-edit__row {
    background: var(--surface-1);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

html.dark .av-address-edit__row {
    background: var(--color-dark-700);
    border-color: var(--color-dark-500);
}

.av-address-edit__row.is-primary {
    border-color: var(--color-primary-400);
    box-shadow: 0 0 0 1px rgb(from var(--color-primary-500) r g b / 0.18);
}

.av-address-edit__row-head {
    width: 100%;
}

.av-address-edit__row-avatar {
    flex-shrink: 0;
}

.av-address-edit__row-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.av-address-edit__row-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 12px;
}

.av-address-edit__row-grid--2 {
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 640px) {
    .av-address-edit__row-grid,
    .av-address-edit__row-grid--2 {
        grid-template-columns: 1fr;
    }
}

.av-address-edit__add-more {
    /* MudButton FullWidth covers the layout; CSS only nudges visual weight */
    border-style: dashed;
}

.av-address-edit__empty {
    padding: 24px 12px;
    text-align: center;
}

.av-address-edit__empty-icon {
    background: rgb(from var(--color-primary-500) r g b / 0.10);
    color: var(--color-primary-600);
}


/* ── Card action buttons ──────────────────────────────────────────────────
 Icon / chip buttons used in the actions group of contact cards (grid and
 table views). Three tokens:

 .av-card-action icon-only, neutral default (used for "More" kebab)
 .av-card-action--primary icon-only, primary tint (used for "Briefing")
 .av-google-chip icon + label chip with two states:
 · default (not synced) → outlined neutral, label "Push"
 · .is-synced → success tint, label "Synced"

 Replaces the previous mix of MudBadge + Variant.Outlined MudIconButton +
 bare brand icon — eliminates the dot-badge, gives the Google control a
 readable verb, and unifies the visual rhythm of the three buttons.
*/

.av-card-action.mud-icon-button {
 width: 32px;
 height: 32px;
 min-width: 32px;
 padding: 0;
 border-radius: var(--radius-lg);
 background-color: transparent;
 color: var(--color-gray-500);
 border: 1px solid transparent;
 transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.av-card-action.mud-icon-button:hover {
 background-color: var(--color-gray-100);
 color: var(--color-gray-800);
}

html.dark .av-card-action.mud-icon-button {
 color: var(--color-dark-200);
}

html.dark .av-card-action.mud-icon-button:hover {
 background-color: var(--color-dark-600);
 color: var(--color-dark-50);
}

.av-card-action.mud-icon-button svg {
 width: 18px;
 height: 18px;
}

/* Normalise icon size inside the kebab popover. HeroIcons outline icons
 have different content bounding boxes (Trash is tall, PencilSquare and
 Eye are wider but shorter), so at the default 24 px they appear visually
 uneven. The selector targets every icon-bearing element MudBlazor may
 render — MudMenuItem can use either .mud-list-item-icon (list mode) or
 .mud-button-icon-start (button mode) depending on Dense/version — plus a
 defensive blanket on all SVGs inside the popover. */
.av-card-action-menu .mud-list-item-icon,
.av-card-action-menu .mud-button-icon-start {
 min-width: 28px;
}

.av-card-action-menu .mud-list-item-icon .mud-icon-root,
.av-card-action-menu .mud-list-item-icon svg,
.av-card-action-menu .mud-button-icon-start .mud-icon-root,
.av-card-action-menu .mud-button-icon-start svg,
.av-card-action-menu .mud-menu-item .mud-icon-root,
.av-card-action-menu .mud-menu-item svg,
.av-card-action-menu .mud-list-item .mud-icon-root,
.av-card-action-menu .mud-list-item svg {
 width: 18px !important;
 height: 18px !important;
 font-size: 18px !important;
}

.av-card-action--primary.mud-icon-button {
 color: var(--color-primary-600);
}

.av-card-action--primary.mud-icon-button:hover {
 background-color: rgb(from var(--color-primary-500) r g b / 0.10);
 color: var(--color-primary-700);
}

html.dark .av-card-action--primary.mud-icon-button {
 color: var(--color-primary-400);
}

html.dark .av-card-action--primary.mud-icon-button:hover {
 background-color: rgb(from var(--color-primary-400) r g b / 0.18);
 color: var(--color-primary-300);
}

/* ── Briefing action button ───────────────────────────────────────────────
 Icon-only circular chip in line with the card's quiet visual rhythm — no
 gradient, no shimmer. The Sparkles glyph carries the "AI insight" meaning
 on a soft primary tint, scaling slightly on hover. Pairs visually with the
 neighbouring av-tag chips (same alpha pattern) without competing with the
 tinted Google or Priority chips. */

.av-briefing-btn {
 position: relative;
 width: 24px;
 height: 24px;
 padding: 0;
 border: none;
 border-radius: 50%;
 background-color: rgb(from var(--color-primary-600) r g b / 0.10);
 color: var(--color-primary-700);
 cursor: pointer;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 flex-shrink: 0;
 transition: background-color 200ms ease, color 200ms ease, transform 150ms ease;
}

.av-briefing-btn svg {
 width: 14px;
 height: 14px;
}

.av-briefing-btn:hover {
 background-color: rgb(from var(--color-primary-600) r g b / 0.18);
 color: var(--color-primary-800);
 transform: scale(1.08);
}

.av-briefing-btn:active {
 transform: scale(0.96);
}

.av-briefing-btn:focus-visible {
 outline: 2px solid var(--color-primary-500);
 outline-offset: 2px;
}

html.dark .av-briefing-btn {
 background-color: rgb(from var(--color-primary-400) r g b / 0.14);
 color: var(--color-primary-300);
}

html.dark .av-briefing-btn:hover {
 background-color: rgb(from var(--color-primary-400) r g b / 0.22);
 color: var(--color-primary-200);
}


/* ── Swap mechanism (Guía Visual .swap / .swap-flip) ───────────────────────────
 Two layered children — one with [data-swap-off], one with [data-swap-on]
 — share the same grid cell and 3D-flip when the parent toggles
 .swap-active. Used on the avatar slot to flip between the photo /
 initials and the selected check overlay. Replicates exactly the Guía Visual
 `.swap .swap-flip` compiled rules from estilos.css. */

.swap {
 position: relative;
 display: inline-grid;
 place-content: center;
 user-select: none;
 cursor: pointer;
}

.swap > [data-swap-on],
.swap > [data-swap-off] {
 grid-column-start: 1;
 grid-row-start: 1;
 transition: opacity 300ms ease, transform 300ms ease;
}

.swap > [data-swap-on] {
 opacity: 0;
}

.swap.swap-active > [data-swap-off] {
 opacity: 0;
}

.swap.swap-active > [data-swap-on] {
 opacity: 1;
}

.swap-flip {
 transform-style: preserve-3d;
 perspective: 16em;
}

.swap-flip > [data-swap-on] {
 backface-visibility: hidden;
 opacity: 1;
 transform: rotateY(180deg);
 z-index: 11;
}

.swap-flip.swap-active > [data-swap-off] {
 backface-visibility: hidden;
 opacity: 1;
 transform: rotateY(-180deg);
}

.swap-flip.swap-active > [data-swap-on] {
 transform: rotateY(0);
}


/* ── Tag (Guía Visual .badge-base.badge.rounded-full) ──────────────────────────
 One mold for every "state pill" in the app: Google sync status, Briefing
 pointer, Priority level, and any future status chip. Mirrors Guía Visual's
 `.badge-base.badge.rounded-full` exactly — same padding (4/8), font-size
 (text-xs / 12 px), font-weight medium (500), line-height 1, tracking-wide
 (0.025em). Alpha is 0.07 light / 0.10 dark for every tinted variant,
 matching `bg-this-darker/[0.07]` and `dark:bg-this-lighter/10`.

 Like `.av-btn` and `.av-avatar`, this class declares typography metrics
 directly — the canonical scale has no `Typo.X` that maps to a 12 px
 medium-weight tracked-wide line-height-1 pill.

 Mounts on either MudElement HtmlTag="span" (read-only label) or MudButton
 (clickable action). Both share the same shape via the .mud-button-root
 reset below. */

/* ────────────────────────────────────────────────────────────────────────
   av-edit-btn — soft-primary icon-only button (36 × 36, icon 20 × 20).
   Mirrors the Tailux <Button color="primary" variant="soft" isIcon size-9>
   recipe: primary text/icon on a low-opacity primary background, no
   border, generous rounded-square radius. Hidden by default and revealed
   when the parent card (.av-info-section or legacy .pi-section-card) is
   hovered or contains keyboard focus. Gated by `(hover: hover)` so touch
   devices keep the button visible — there's no hover affordance there.
   ──────────────────────────────────────────────────────────────────────── */

.av-soft-btn-primary.mud-icon-button,
.av-edit-btn.mud-icon-button {
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    border-radius: var(--radius-lg);
    background-color: rgb(from var(--color-primary-600) r g b / 0.10);
    color: var(--color-primary-600);
    transition: background-color 150ms ease, color 150ms ease, opacity 150ms ease;
}

.av-soft-btn-primary.mud-icon-button:hover,
.av-edit-btn.mud-icon-button:hover {
    background-color: rgb(from var(--color-primary-600) r g b / 0.18);
    color: var(--color-primary-700);
}

.av-soft-btn-primary.mud-icon-button .mud-icon-root,
.av-soft-btn-primary.mud-icon-button svg,
.av-edit-btn.mud-icon-button .mud-icon-root,
.av-edit-btn.mud-icon-button svg {
    width: 20px;
    height: 20px;
}

html.dark .av-soft-btn-primary.mud-icon-button,
html.dark .av-edit-btn.mud-icon-button {
    background-color: rgb(from var(--color-primary-400) r g b / 0.15);
    color: var(--color-primary-400);
}

html.dark .av-soft-btn-primary.mud-icon-button:hover,
html.dark .av-edit-btn.mud-icon-button:hover {
    background-color: rgb(from var(--color-primary-400) r g b / 0.25);
    color: var(--color-primary-300);
}

@media (hover: hover) {
    .av-info-section .av-edit-btn.mud-icon-button,
    .pi-section-card .av-edit-btn.mud-icon-button {
        opacity: 0;
        pointer-events: none;
    }

    .av-info-section:hover .av-edit-btn.mud-icon-button,
    .av-info-section:focus-within .av-edit-btn.mud-icon-button,
    .pi-section-card:hover .av-edit-btn.mud-icon-button,
    .pi-section-card:focus-within .av-edit-btn.mud-icon-button {
        opacity: 1;
        pointer-events: auto;
    }
}

/* ────────────────────────────────────────────────────────────────────────
   av-social-grid / av-social-card — Tailux soft card grid for social
   profiles and messaging apps. Each card is a white surface with a brand
   icon disc on the top-left, platform name + verified badge, the user's
   handle (or URL) with a small copy button, and an action group on the
   top-right (visit / edit / delete) that reveals on hover. The icon disc
   stays neutral gray — differentiation comes from the brand SVG inside,
   which carries its own multi-color fills (Facebook blue, Instagram pink
   gradient, etc.), so we don't need per-platform hex overrides anywhere.
   ──────────────────────────────────────────────────────────────────────── */

.av-social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.av-social-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px;
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    box-shadow:
        0 0 2px rgb(145 158 171 / 0.15),
        0 8px 18px -6px rgb(145 158 171 / 0.10);
    transition: border-color 120ms ease, box-shadow 120ms ease;
    min-width: 0;
}

html.dark .av-social-card {
    background: var(--color-dark-700);
    border-color: var(--color-dark-500);
    box-shadow: none;
}

.av-social-card:hover {
    border-color: var(--color-gray-300);
}

html.dark .av-social-card:hover {
    border-color: var(--color-dark-400);
}

.av-social-card__top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.av-social-card__icon-disc {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-lg);
    background: var(--color-gray-100);
    color: var(--color-gray-700);
    flex-shrink: 0;
}

html.dark .av-social-card__icon-disc {
    background: var(--color-dark-500);
    color: var(--color-dark-100);
}

.av-social-card__icon-disc .mud-icon-root,
.av-social-card__icon-disc svg {
    width: 22px;
    height: 22px;
}

.av-social-card__actions {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

@media (hover: hover) {
    .av-social-card .av-social-card__actions {
        opacity: 0;
        pointer-events: none;
        transition: opacity 150ms ease;
    }

    .av-social-card:hover .av-social-card__actions,
    .av-social-card:focus-within .av-social-card__actions {
        opacity: 1;
        pointer-events: auto;
    }
}

.av-social-card__action-btn.mud-icon-button {
    width: 28px;
    height: 28px;
    min-width: 28px;
    padding: 0;
    border-radius: var(--radius-md);
    color: var(--color-gray-500);
    transition: background-color 120ms ease, color 120ms ease;
}

.av-social-card__action-btn.mud-icon-button:hover {
    background-color: var(--color-gray-100);
    color: var(--color-gray-800);
}

html.dark .av-social-card__action-btn.mud-icon-button {
    color: var(--color-dark-200);
}

html.dark .av-social-card__action-btn.mud-icon-button:hover {
    background-color: var(--color-dark-600);
    color: var(--color-dark-50);
}

.av-social-card__action-btn.mud-icon-button .mud-icon-root,
.av-social-card__action-btn.mud-icon-button svg {
    width: 16px;
    height: 16px;
}

.av-social-card__action-btn--danger.mud-icon-button:hover {
    background-color: rgb(from var(--color-error) r g b / 0.10);
    color: var(--color-error);
}

.av-social-card__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.av-social-card__platform-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.av-social-card__platform.mud-typography {
    color: var(--color-gray-900);
}

html.dark .av-social-card__platform.mud-typography {
    color: var(--color-dark-50);
}

.av-social-card__verified-icon.mud-icon-root {
    width: 16px;
    height: 16px;
    color: var(--color-success-darker);
}

html.dark .av-social-card__verified-icon.mud-icon-root {
    color: var(--color-success-lighter);
}

.av-social-card__handle-row {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.av-social-card__handle.mud-typography {
    color: var(--color-gray-600);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1 1 auto;
    min-width: 0;
}

html.dark .av-social-card__handle.mud-typography {
    color: var(--color-dark-200);
}

.av-social-card__copy-btn.mud-icon-button {
    width: 24px;
    height: 24px;
    min-width: 24px;
    padding: 0;
    border-radius: var(--radius-md);
    color: var(--color-gray-400);
    flex-shrink: 0;
    transition: background-color 120ms ease, color 120ms ease;
}

.av-social-card__copy-btn.mud-icon-button:hover {
    color: var(--color-primary-600);
    background-color: rgb(from var(--color-primary-600) r g b / 0.08);
}

html.dark .av-social-card__copy-btn.mud-icon-button {
    color: var(--color-dark-300);
}

html.dark .av-social-card__copy-btn.mud-icon-button:hover {
    color: var(--color-primary-400);
    background-color: rgb(from var(--color-primary-400) r g b / 0.14);
}

.av-social-card__copy-btn.mud-icon-button .mud-icon-root,
.av-social-card__copy-btn.mud-icon-button svg {
    width: 14px;
    height: 14px;
}

.av-tag {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 gap: 4px;
 padding: 4px 8px;
 border: none;
 border-radius: 9999px;
 background-color: transparent;
 color: var(--color-gray-700);
 font-size: var(--text-xs);
 font-weight: 500;
 line-height: 1;
 letter-spacing: 0.025em;
 cursor: default;
 flex-shrink: 0;
 white-space: nowrap;
 vertical-align: baseline;
 transition: background-color 150ms ease, color 150ms ease;
}

html.dark .av-tag {
 color: var(--color-dark-100);
}

/* MudButton reset when it carries .av-tag — strip default button geometry */
.av-tag.mud-button-root {
 min-width: 0;
 height: auto;
 text-transform: none;
 cursor: pointer;
}

.av-tag.mud-button-root .mud-button-label {
 font-size: var(--text-xs);
 font-weight: 500;
 letter-spacing: 0.025em;
 line-height: 1;
}

.av-tag .mud-button-icon-start {
 margin: 0;
}

.av-tag svg {
 width: 13px;
 height: 13px;
 flex-shrink: 0;
}

/* Variant — neutral (used for Google "Push", not synced yet) */
.av-tag--neutral {
 background-color: var(--color-gray-100);
 color: var(--color-gray-700);
}

.av-tag.av-tag--neutral.mud-button-root:hover {
 background-color: var(--color-gray-200);
}

html.dark .av-tag--neutral {
 background-color: var(--color-dark-500);
 color: var(--color-dark-100);
}

html.dark .av-tag.av-tag--neutral.mud-button-root:hover {
 background-color: var(--color-dark-400);
}

/* Variant — success (Google "Synced") */
.av-tag--success {
 background-color: rgb(from var(--color-success-darker) r g b / 0.07);
 color: var(--color-success-darker);
}

.av-tag.av-tag--success.mud-button-root:hover {
 background-color: rgb(from var(--color-success-darker) r g b / 0.15);
}

html.dark .av-tag--success {
 background-color: rgb(from var(--color-success-lighter) r g b / 0.10);
 color: var(--color-success-lighter);
}

html.dark .av-tag.av-tag--success.mud-button-root:hover {
 background-color: rgb(from var(--color-success-lighter) r g b / 0.18);
}

/* Variant — primary (Briefing) */
.av-tag--primary {
 background-color: rgb(from var(--color-primary-600) r g b / 0.07);
 color: var(--color-primary-700);
}

.av-tag.av-tag--primary.mud-button-root:hover {
 background-color: rgb(from var(--color-primary-600) r g b / 0.15);
}

html.dark .av-tag--primary {
 background-color: rgb(from var(--color-primary-400) r g b / 0.10);
 color: var(--color-primary-300);
}

html.dark .av-tag.av-tag--primary.mud-button-root:hover {
 background-color: rgb(from var(--color-primary-400) r g b / 0.18);
}

/* Priority variants — 5 tints spanning 10 levels (paired 1-2, 3-4, ..., 9-10).
 Same 7% light / 10% dark alpha as the rest, color carries the level. */

.av-tag--priority-1,
.av-tag--priority-2 {
 background-color: rgb(from var(--color-error-darker) r g b / 0.07);
 color: var(--color-error-darker);
}

.av-tag--priority-3,
.av-tag--priority-4 {
 background-color: rgb(from var(--color-warning-darker) r g b / 0.07);
 color: var(--color-warning-darker);
}

.av-tag--priority-5,
.av-tag--priority-6 {
 background-color: rgb(from var(--color-amber-700) r g b / 0.07);
 color: var(--color-amber-700);
}

.av-tag--priority-7,
.av-tag--priority-8 {
 background-color: rgb(from var(--color-emerald-500) r g b / 0.07);
 color: var(--color-emerald-700);
}

.av-tag--priority-9,
.av-tag--priority-10 {
 background-color: rgb(from var(--color-success-darker) r g b / 0.07);
 color: var(--color-success-darker);
}

html.dark .av-tag--priority-1,
html.dark .av-tag--priority-2 {
 background-color: rgb(from var(--color-error-lighter) r g b / 0.10);
 color: var(--color-error-lighter);
}

html.dark .av-tag--priority-3,
html.dark .av-tag--priority-4 {
 background-color: rgb(from var(--color-warning-lighter) r g b / 0.10);
 color: var(--color-warning-lighter);
}

html.dark .av-tag--priority-5,
html.dark .av-tag--priority-6 {
 background-color: rgb(from var(--color-amber-400) r g b / 0.10);
 color: var(--color-amber-400);
}

html.dark .av-tag--priority-7,
html.dark .av-tag--priority-8 {
 background-color: rgb(from var(--color-emerald-400) r g b / 0.10);
 color: var(--color-emerald-400);
}

html.dark .av-tag--priority-9,
html.dark .av-tag--priority-10 {
 background-color: rgb(from var(--color-success-lighter) r g b / 0.10);
 color: var(--color-success-lighter);
}


/* ── Contact card v1 ──────────────────────────────────────────────────────
 Guía Visual-inspired grid card for the contact list. Replaces the legacy
 .clp-contact-card. Three horizontal bands separated by a hairline rule:

 1. Hero avatar (squircle) + name + ContactType + kebab
 2. Channels one row per phone / email, action pills on the right
 3. Status three rows (Google / Briefing / Priority) with chips

 The checkbox lives inside the avatar slot: avatar visible by default,
 checkbox fades in on hover or when the card is selected. When ANY card in
 the grid is selected, every card switches into "selection mode" (avatars
 hidden, checkboxes always visible) — keeps multi-select fluid.
*/

.av-contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding: 0px;
}

.av-contact-card {
 position: relative;
 display: flex;
 flex-direction: column;
 background-color: var(--color-white);
 border: 1px solid var(--color-gray-200);
 border-radius: var(--radius-xl);
 box-shadow: 0 1px 2px rgb(from var(--color-gray-900) r g b / 0.04);
 cursor: pointer;
 overflow: hidden;
 transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.av-contact-card:hover {
 border-color: var(--color-gray-300);
 box-shadow: 0 4px 12px -4px rgb(from var(--color-gray-900) r g b / 0.08),
 0 2px 4px -2px rgb(from var(--color-gray-900) r g b / 0.04);
 transform: translateY(-1px);
}

.av-contact-card.is-selected {
 border-color: var(--color-primary-500);
 box-shadow: 0 0 0 3px rgb(from var(--color-primary-500) r g b / 0.12);
}

html.dark .av-contact-card {
 background-color: var(--color-dark-700);
 border-color: var(--color-dark-500);
 box-shadow: 0 1px 2px rgb(0 0 0 / 0.3);
}

html.dark .av-contact-card:hover {
 border-color: var(--color-dark-400);
 box-shadow: 0 4px 12px -4px rgb(0 0 0 / 0.4),
 0 2px 4px -2px rgb(0 0 0 / 0.3);
}

html.dark .av-contact-card.is-selected {
 border-color: var(--color-primary-400);
 box-shadow: 0 0 0 3px rgb(from var(--color-primary-400) r g b / 0.18);
}

/* Band 1 — Hero */

.av-contact-card__hero {
 display: flex;
 align-items: flex-start;
 gap: 12px;
 padding: 16px;
}

/* Transparent wrapper hosting @onclick:stopPropagation on a separate element
 from the inner button's @onclick — dodges Blazor RZ10010 (the directive
 modifier conflicts with @onclick when both sit on the same element). */
.av-contact-card__avatar-wrap {
 display: inline-flex;
 flex-shrink: 0;
}

/* Avatar slot is a clickable <button>: the avatar stays visible always,
 a dashed primary ring fades in on hover (indicating "click to select"),
 and a solid primary circle with a white check replaces the avatar when
 the contact is selected. The legacy MudCheckBox overlay is gone. */
.av-contact-card__avatar-slot {
 position: relative;
 width: 48px;
 height: 48px;
 flex-shrink: 0;
 background: transparent;
 border: none;
 padding: 0;
 cursor: pointer;
 border-radius: 50%;
}

.av-contact-card__avatar-slot:focus-visible {
 outline: 2px solid var(--color-primary-500);
 outline-offset: 3px;
}

.av-contact-card__avatar,
.av-contact-card__avatar-img {
 width: 48px;
 height: 48px;
 display: flex;
 align-items: center;
 justify-content: center;
 border-radius: 50%;
 font-weight: 600;
 color: var(--color-gray-700);
 background: var(--color-gray-100);
 overflow: hidden;
}

.av-contact-card__avatar-img {
 object-fit: cover;
}

/* Override the legacy gradient avatar classes when they appear inside the slot,
 replacing saturated gradients with the soft Guía Visual tint. */
.av-contact-card__avatar.avatar-pink {
 background: var(--color-rose-100) !important;
 color: var(--color-rose-700);
}

.av-contact-card__avatar.avatar-blue {
 background: var(--color-blue-100) !important;
 color: var(--color-blue-700);
}

.av-contact-card__avatar.avatar-green {
 background: var(--color-emerald-100) !important;
 color: var(--color-emerald-700);
}

.av-contact-card__avatar.avatar-purple {
 background: var(--color-violet-100) !important;
 color: var(--color-violet-700);
}

.av-contact-card__avatar.avatar-orange {
 background: var(--color-amber-100) !important;
 color: var(--color-amber-800);
}

html.dark .av-contact-card__avatar.avatar-pink {
 background: rgb(from var(--color-rose-400) r g b / 0.22) !important;
 color: var(--color-rose-200);
}

html.dark .av-contact-card__avatar.avatar-blue {
 background: rgb(from var(--color-blue-400) r g b / 0.22) !important;
 color: var(--color-blue-200);
}

html.dark .av-contact-card__avatar.avatar-green {
 background: rgb(from var(--color-emerald-400) r g b / 0.22) !important;
 color: var(--color-emerald-200);
}

html.dark .av-contact-card__avatar.avatar-purple {
 background: rgb(from var(--color-violet-400) r g b / 0.22) !important;
 color: var(--color-violet-200);
}

html.dark .av-contact-card__avatar.avatar-orange {
 background: rgb(from var(--color-amber-400) r g b / 0.22) !important;
 color: var(--color-amber-200);
}

/* Hover ring — dashed primary border around the avatar slot when the card is
 hovered (and not already selected), or globally when the grid is in
 selection mode. Painted via outline so it does not push layout. */
.av-contact-card:hover .av-contact-card__avatar-slot,
.av-contacts-grid.is-in-selection-mode .av-contact-card:not(.is-selected) .av-contact-card__avatar-slot {
 outline: 2px dashed var(--color-primary-500);
 outline-offset: 3px;
}

html.dark .av-contact-card:hover .av-contact-card__avatar-slot,
html.dark .av-contacts-grid.is-in-selection-mode .av-contact-card:not(.is-selected) .av-contact-card__avatar-slot {
 outline-color: var(--color-primary-400);
}

/* Check overlay — solid primary circle with white check, painted via the
 .swap-flip mechanism. The visibility / 3D rotation is driven by [data-swap-on]
 and the parent .swap-active toggle (declared in the global swap block);
 this rule only owns geometry and color. */
.av-contact-card__check-overlay {
 width: 48px;
 height: 48px;
 display: flex;
 align-items: center;
 justify-content: center;
 border-radius: 50%;
 background: var(--color-primary-600);
 color: var(--color-white);
}

html.dark .av-contact-card__check-overlay {
 background: var(--color-primary-500);
}

.av-contact-card__check-overlay .mud-icon-root,
.av-contact-card__check-overlay svg {
 width: 26px;
 height: 26px;
 color: var(--color-white);
}


/* Hero-meta owns the open-detail click. Cursor pointer signals that
 clicking the name / type opens the contact, while the avatar slot
 keeps its own selection click and the kebab opens the menu. */
.av-contact-card__hero-meta {
 flex: 1;
 min-width: 0;
 display: flex;
 flex-direction: column;
 gap: 2px;
 padding-top: 2px;
 cursor: pointer;
}

.av-contact-card__name.mud-typography {
 display: flex;
 align-items: center;
 gap: 6px;
 color: var(--color-gray-900);
 min-width: 0;
}

.av-contact-card__name-text {
 flex: 1;
 min-width: 0;
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}

html.dark .av-contact-card__name.mud-typography {
 color: var(--color-dark-50);
}

.av-contact-card__org-pill {
 display: inline-flex;
 align-items: center;
 height: 16px;
 padding: 0 6px;
 border-radius: 9999px;
 background: var(--color-primary-100);
 color: var(--color-primary-700);
 font-size: 9px;
 font-weight: 600;
 letter-spacing: 0.06em;
 text-transform: uppercase;
 flex-shrink: 0;
}

html.dark .av-contact-card__org-pill {
 background: rgb(from var(--color-primary-400) r g b / 0.2);
 color: var(--color-primary-200);
}

.av-contact-card__type.mud-typography {
 color: var(--color-gray-500);
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}

html.dark .av-contact-card__type.mud-typography {
 color: var(--color-dark-300);
}

.av-contact-card__kebab.mud-icon-button {
 margin-top: -2px;
 flex-shrink: 0;
}

/* Band 2 — Channels */

.av-contact-card__channels {
 display: flex;
 flex-direction: column;
 border-top: 1px solid var(--color-gray-100);
 padding: 12px 16px;
 gap: 8px;
}

html.dark .av-contact-card__channels {
 border-top-color: var(--color-dark-600);
}

.av-contact-card__channel {
 display: flex;
 align-items: center;
 gap: 12px;
}

/* Channel value (phone / email text).
 MudLink applies `.mud-link.mud-primary-text` which has high specificity
 AND ships in MudBlazor's main CSS that loads before avalme-v1.css —
 `!important` is the cleanest way to keep this color contract regardless
 of where the bundle order ends up. Same exception pattern as `av-btn`
 and `av-avatar`: the channel value carries domain-specific typography
 that does not map to a `Typo.X` in the canonical scale. */
.av-contact-card__channel-value,
.av-contact-card__channel-value.mud-link,
.av-contact-card__channel-value.mud-typography,
.av-contact-card__channel-value.mud-link.mud-primary-text {
 flex: 1;
 min-width: 0;
 color: var(--color-gray-700) !important;
 font-size: var(--text-sm) !important;
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
 text-decoration: none !important;
}

.av-contact-card__channel-value:hover,
.av-contact-card__channel-value.mud-link:hover,
.av-contact-card__channel-value.mud-link.mud-primary-text:hover {
 color: var(--color-primary-600) !important;
 text-decoration: none !important;
}

html.dark .av-contact-card__channel-value,
html.dark .av-contact-card__channel-value.mud-link,
html.dark .av-contact-card__channel-value.mud-typography,
html.dark .av-contact-card__channel-value.mud-link.mud-primary-text {
 color: var(--color-dark-200) !important;
}

html.dark .av-contact-card__channel-value:hover,
html.dark .av-contact-card__channel-value.mud-link:hover,
html.dark .av-contact-card__channel-value.mud-link.mud-primary-text:hover {
 color: var(--color-primary-300) !important;
}

.av-contact-card__channel-pills {
 display: flex;
 gap: 6px;
 flex-shrink: 0;
}

.av-contact-card__channel-pill.mud-icon-button {
 width: 28px;
 height: 28px;
 min-width: 28px;
 padding: 0;
 border-radius: 9999px;
 flex-shrink: 0;
 transition: background-color 200ms ease, color 200ms ease;
}

.av-contact-card__channel-pill.mud-icon-button svg {
 width: 16px;
 height: 16px;
}

/* Call pill — success tint */
.av-contact-card__channel-pill--call.mud-icon-button {
 background-color: rgb(from var(--color-success-darker) r g b / 0.08);
 color: var(--color-success-darker);
}

.av-contact-card__channel-pill--call.mud-icon-button:hover,
.av-contact-card__channel-pill--call.mud-icon-button:focus {
 background-color: rgb(from var(--color-success-darker) r g b / 0.15);
}

.av-contact-card__channel-pill--call.mud-icon-button:active {
 background-color: rgb(from var(--color-success-darker) r g b / 0.20);
}

html.dark .av-contact-card__channel-pill--call.mud-icon-button {
 background-color: rgb(from var(--color-success-lighter) r g b / 0.10);
 color: var(--color-success-lighter);
}

html.dark .av-contact-card__channel-pill--call.mud-icon-button:hover,
html.dark .av-contact-card__channel-pill--call.mud-icon-button:focus {
 background-color: rgb(from var(--color-success-lighter) r g b / 0.20);
}

html.dark .av-contact-card__channel-pill--call.mud-icon-button:active {
 background-color: rgb(from var(--color-success-lighter) r g b / 0.25);
}

/* Mail pill — info tint */
.av-contact-card__channel-pill--mail.mud-icon-button {
 background-color: rgb(from var(--color-info-darker) r g b / 0.08);
 color: var(--color-info-darker);
}

.av-contact-card__channel-pill--mail.mud-icon-button:hover,
.av-contact-card__channel-pill--mail.mud-icon-button:focus {
 background-color: rgb(from var(--color-info-darker) r g b / 0.15);
}

.av-contact-card__channel-pill--mail.mud-icon-button:active {
 background-color: rgb(from var(--color-info-darker) r g b / 0.20);
}

html.dark .av-contact-card__channel-pill--mail.mud-icon-button {
 background-color: rgb(from var(--color-info-lighter) r g b / 0.10);
 color: var(--color-info-lighter);
}

html.dark .av-contact-card__channel-pill--mail.mud-icon-button:hover,
html.dark .av-contact-card__channel-pill--mail.mud-icon-button:focus {
 background-color: rgb(from var(--color-info-lighter) r g b / 0.20);
}

html.dark .av-contact-card__channel-pill--mail.mud-icon-button:active {
 background-color: rgb(from var(--color-info-lighter) r g b / 0.25);
}

/* Band 3 — Status */

.av-contact-card__status {
 display: flex;
 flex-direction: column;
 border-top: 1px solid var(--color-gray-100);
 padding: 12px 16px 16px;
 gap: 10px;
}

html.dark .av-contact-card__status {
 border-top-color: var(--color-dark-600);
}

.av-contact-card__status-row {
 display: flex;
 align-items: center;
 gap: 12px;
}

.av-contact-card__status-label.mud-typography {
 flex: 1;
 min-width: 0;
 color: var(--color-gray-700);
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}

html.dark .av-contact-card__status-label.mud-typography {
 color: var(--color-dark-200);
}

/* ============================================================================
 Per-tenant External Integrations list (EditTenant → Settings tab)

 Layout: single column capped at 880px, one card per provider. Used by
 TenantIntegrationsSettings.razor + each <Provider>IntegrationDialog.razor.
 Typography is owned entirely by Typo.X on MudText (doctrine §Typography) —
 only color, spacing, layout and state classes live here.
 ============================================================================ */

.av-integrations {
 display: flex;
 flex-direction: column;
 gap: 24px;
 max-width: 880px;
 width: 100%;
}

.av-integrations__header {
 display: flex;
 flex-direction: column;
 gap: 4px;
}

.av-integrations__subtitle.mud-typography {
 color: var(--color-gray-600);
}

html.dark .av-integrations__subtitle.mud-typography {
 color: var(--color-dark-200);
}

.av-integrations__list {
 display: flex;
 flex-direction: column;
 gap: 12px;
}

/* — card per provider — — — — — — — — — — — — — — — — — — — — — — — — — — */

.av-integration-card {
 display: flex;
 flex-direction: column;
 gap: 16px;
 padding: 20px 24px;
 background: var(--color-white);
 border: 1px solid var(--color-gray-200);
 border-radius: var(--radius-lg);
 transition: border-color 150ms ease, box-shadow 150ms ease;
}

.av-integration-card:hover {
 border-color: var(--color-gray-300);
 box-shadow: 0 1px 2px rgb(from var(--color-gray-900) r g b / 0.04);
}

html.dark .av-integration-card {
 background: var(--color-dark-700);
 border-color: var(--color-dark-500);
}

html.dark .av-integration-card:hover {
 border-color: var(--color-dark-400);
 box-shadow: 0 1px 2px rgb(0 0 0 / 0.25);
}

.av-integration-card__head {
 display: flex;
 align-items: flex-start;
 gap: 16px;
}

.av-integration-card__avatar {
 flex-shrink: 0;
 width: 40px;
 height: 40px;
 display: flex;
 align-items: center;
 justify-content: center;
 border-radius: var(--radius-md);
 background: var(--color-gray-100);
 color: var(--color-gray-700);
}

.av-integration-card__avatar .mud-icon-root {
 width: 22px;
 height: 22px;
}

html.dark .av-integration-card__avatar {
 background: var(--color-dark-600);
 color: var(--color-dark-100);
}

.av-integration-card__title {
 flex: 1 1 auto;
 min-width: 0;
 display: flex;
 flex-direction: column;
 gap: 2px;
}

.av-integration-card__description.mud-typography {
 color: var(--color-gray-600);
}

html.dark .av-integration-card__description.mud-typography {
 color: var(--color-dark-200);
}

.av-integration-card__status {
 flex-shrink: 0;
 display: inline-flex;
 align-items: center;
 gap: 6px;
}

.av-integration-card__status .mud-typography-overline {
 color: var(--color-gray-700);
}

html.dark .av-integration-card__status .mud-typography-overline {
 color: var(--color-dark-100);
}

.av-integration-card__dot {
 width: 8px;
 height: 8px;
 border-radius: 9999px;
 flex-shrink: 0;
}

.av-integration-card__dot--on {
 background: var(--color-success);
 box-shadow: 0 0 0 3px rgb(from var(--color-success) r g b / 0.16);
}

.av-integration-card__dot--off {
 background: var(--color-gray-300);
}

html.dark .av-integration-card__dot--off {
 background: var(--color-dark-400);
}

/* — meta (Client ID / masked Secret) when configured — — — — — — — — — — — */

.av-integration-card__meta {
 display: grid;
 grid-template-columns: 1fr;
 gap: 12px;
 margin: 0;
 padding: 12px 16px;
 background: var(--color-gray-50);
 border-radius: var(--radius-md);
}

html.dark .av-integration-card__meta {
 background: var(--color-dark-800);
}

@media (min-width: 640px) {
 .av-integration-card__meta {
 grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
 gap: 12px 24px;
 }
}

.av-integration-card__meta-pair {
 display: flex;
 flex-direction: column;
 gap: 2px;
 min-width: 0;
}

.av-integration-card__meta-key.mud-typography {
 color: var(--color-gray-500);
}

html.dark .av-integration-card__meta-key.mud-typography {
 color: var(--color-dark-300);
}

.av-integration-card__meta-value.mud-typography {
 color: var(--color-gray-800);
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}

html.dark .av-integration-card__meta-value.mud-typography {
 color: var(--color-dark-50);
}

.av-integration-card__meta-value--mono.mud-typography {
 font-variant-numeric: tabular-nums;
}

/* — actions row — — — — — — — — — — — — — — — — — — — — — — — — — — — — — */

.av-integration-card__actions {
 display: flex;
 justify-content: flex-end;
 gap: 12px;
}

.av-integration-card__btn.mud-button-root {
 color: var(--color-primary-600);
 background: transparent;
 border: 1px solid var(--color-gray-200);
 border-radius: 9999px;
 padding: 6px 14px;
}

.av-integration-card__btn.mud-button-root:hover {
 background: var(--color-gray-50);
 border-color: var(--color-gray-300);
}

html.dark .av-integration-card__btn.mud-button-root {
 color: var(--color-primary-300);
 border-color: var(--color-dark-500);
}

html.dark .av-integration-card__btn.mud-button-root:hover {
 background: var(--color-dark-600);
 border-color: var(--color-dark-400);
}

/* — Danger zone inside the provider dialog — — — — — — — — — — — — — — — — */

.av-form-dialog__danger-zone {
 margin-top: 8px;
 padding-top: 16px;
 border-top: 1px dashed var(--color-gray-200);
 display: flex;
 justify-content: flex-start;
}

html.dark .av-form-dialog__danger-zone {
 border-top-color: var(--color-dark-500);
}

.av-form-dialog__danger-btn.mud-button-root {
 color: var(--color-error);
 background: transparent;
 border: 1px solid transparent;
 border-radius: 9999px;
 padding: 6px 14px;
}

.av-form-dialog__danger-btn.mud-button-root:hover {
 background: rgb(from var(--color-error) r g b / 0.08);
 border-color: rgb(from var(--color-error) r g b / 0.32);
}

html.dark .av-form-dialog__danger-btn.mud-button-root:hover {
 background: rgb(from var(--color-error) r g b / 0.12);
}

/* — Mobile (≤640) collapses the head into stacked rows — — — — — — — — — — */

@media (max-width: 640px) {
 .av-integration-card__head {
 flex-wrap: wrap;
 }

 .av-integration-card__status {
 width: 100%;
 justify-content: flex-start;
 padding-left: 56px; /* matches avatar width + gap so it aligns under the title */
 }
}

/* ============================================================================
 Generic page-level tabs (.av-page-tabs)

 Underline tabs with icon+label inline, primary-colored active state and a
 single hairline divider under the tab row. Adapted from .notification-tabs
 (compact, no panels) for full-page edit/settings layouts that DO render
 MudTabPanel content below. Icon comes from HeroIcons / LucideIcons.

 Used by EditTenant.razor. Reusable for any other multi-tab edit page that
 needs the same "Stripe Settings" feel without the Material pill chrome.

 Typography lives inside .mud-tab .mud-button-label — Mud doesn't surface a
 .mud-typography-* class on tab labels, so this falls under the exception
 list of §Typography (same carve-out as MudButton / MudAvatar).
 ============================================================================ */

.av-page-tabs.mud-tabs,
.av-page-tabs {
 background: transparent !important;
 border-radius: 0 !important;
 box-shadow: none !important;
 overflow: visible !important;
 border-bottom: 1px solid var(--color-gray-200);
}

html.dark .av-page-tabs {
 border-bottom-color: var(--color-dark-500);
}

.av-page-tabs .mud-tabs-toolbar,
.av-page-tabs .mud-tabs-toolbar-inner,
.av-page-tabs .mud-tabs-toolbar-content,
.av-page-tabs .mud-tabs-tabbar,
.av-page-tabs .mud-tabs-tabbar-wrapper {
 background: transparent !important;
 border: none !important;
 min-height: auto !important;
 padding: 0 !important;
 margin: 0 !important;
 box-shadow: none !important;
 overflow: visible !important;
}

.av-page-tabs .mud-tab-slider {
 display: none !important;
}

.av-page-tabs.mud-tabs .mud-tab,
.av-page-tabs .mud-tab {
 padding: 10px 16px !important;
 margin: 0 4px !important;
 min-height: 44px !important;
 border-top: none !important;
 border-right: none !important;
 border-left: none !important;
 border-bottom: 2px solid transparent !important;
 border-radius: 0 !important;
 color: var(--color-gray-600) !important;
 background: transparent !important;
 background-image: none !important;
 box-shadow: none !important;
 opacity: 1 !important;
 text-decoration: none !important;
 text-transform: none !important;
 letter-spacing: 0 !important;
 transition: color 150ms ease, border-color 150ms ease !important;
 white-space: nowrap !important;
 flex-shrink: 0 !important;
}

.av-page-tabs .mud-tab .mud-button-label {
 font-family: var(--font-sans) !important;
 font-size: var(--text-sm) !important;
 font-weight: var(--font-weight-medium, 500) !important;
 line-height: 1.2 !important;
}

.av-page-tabs.mud-tabs .mud-tab:hover,
.av-page-tabs.mud-tabs .mud-tab:focus,
.av-page-tabs.mud-tabs .mud-tab:focus-visible,
.av-page-tabs.mud-tabs .mud-tab:active,
.av-page-tabs .mud-tab:hover,
.av-page-tabs .mud-tab:focus,
.av-page-tabs .mud-tab:focus-visible,
.av-page-tabs .mud-tab:active {
 color: var(--color-gray-900) !important;
 background: transparent !important;
 background-image: none !important;
 box-shadow: none !important;
 outline: none !important;
}

/* Icon + text inline (Mud renders them stacked by default) */
.av-page-tabs .mud-tab .mud-tab-icon-text {
 flex-direction: row !important;
 align-items: center !important;
 gap: 8px !important;
}

.av-page-tabs .mud-tab .mud-icon-root,
.av-page-tabs .mud-tab .mud-tab-icon {
 width: 18px !important;
 height: 18px !important;
 margin: 0 !important;
}

/* Strip Mud ripples / hover halos */
.av-page-tabs .mud-tab .mud-ripple,
.av-page-tabs .mud-tab .mud-ripple-visual,
.av-page-tabs .mud-tab .mud-ripple-container,
.av-page-tabs .mud-tab::before,
.av-page-tabs .mud-tab::after {
 display: none !important;
 background: transparent !important;
}

.av-page-tabs .mud-tab > *,
.av-page-tabs .mud-tab .mud-tab-icon-text,
.av-page-tabs .mud-tab .mud-button-label,
.av-page-tabs .mud-tab .mud-tab-text-wrapper {
 background: transparent !important;
 background-image: none !important;
 box-shadow: none !important;
}

/* Active tab — color + underline */
.av-page-tabs.mud-tabs .mud-tab.mud-tab-active,
.av-page-tabs.mud-tabs .mud-tab.mud-tab-active:hover,
.av-page-tabs.mud-tabs .mud-tab.mud-tab-active:focus,
.av-page-tabs .mud-tab.mud-tab-active,
.av-page-tabs .mud-tab.mud-tab-active:hover,
.av-page-tabs .mud-tab.mud-tab-active:focus {
 color: var(--color-primary-600) !important;
 border-bottom-color: var(--color-primary-600) !important;
 background: transparent !important;
 background-image: none !important;
 box-shadow: none !important;
}

/* Disabled tab (e.g. Manager disabled when IsTemplate) */
.av-page-tabs .mud-tab.mud-disabled {
 opacity: 0.45 !important;
 cursor: not-allowed !important;
}

/* Panel content gets a breath after the underline */
.av-page-tabs .mud-tabs-panels {
 padding-top: 20px;
}

/* Dark mode */
html.dark .av-page-tabs.mud-tabs .mud-tab,
html.dark .av-page-tabs .mud-tab {
 color: var(--color-dark-200) !important;
}

html.dark .av-page-tabs .mud-tab:hover,
html.dark .av-page-tabs .mud-tab:focus {
 color: var(--color-dark-50) !important;
}

html.dark .av-page-tabs.mud-tabs .mud-tab.mud-tab-active,
html.dark .av-page-tabs.mud-tabs .mud-tab.mud-tab-active:hover,
html.dark .av-page-tabs.mud-tabs .mud-tab.mud-tab-active:focus,
html.dark .av-page-tabs .mud-tab.mud-tab-active,
html.dark .av-page-tabs .mud-tab.mud-tab-active:hover,
html.dark .av-page-tabs .mud-tab.mud-tab-active:focus {
 color: var(--color-primary-400) !important;
 border-bottom-color: var(--color-primary-400) !important;
}

/* Mobile (≤640): horizontal scroll instead of wrapping — tabs stay on one line */
@media (max-width: 640px) {
 .av-page-tabs .mud-tabs-toolbar,
 .av-page-tabs .mud-tabs-tabbar,
 .av-page-tabs .mud-tabs-tabbar-wrapper {
 overflow-x: auto !important;
 }

 .av-page-tabs.mud-tabs .mud-tab,
 .av-page-tabs .mud-tab {
 padding: 10px 12px !important;
 }
}

/* ============================================================================
   .av-view-toggle — segmented icon-button group (Grid / Table). Shares the
   visual language of .av-boxed-tabs (gray rounded container + white pill on
   the active button) so the toolbar reads as one family. Two child <button>s
   wrap a MudIcon each; the active one carries `.av-view-toggle__btn--active`.
   No internal divider — the active white pill is the only visual cue.
   ============================================================================ */
.av-view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: var(--color-gray-200);
    border-radius: var(--radius-md);
    border: none;
    padding: 3px;
}

html.dark .av-view-toggle {
    background: var(--color-dark-900);
}

.av-view-toggle__btn {
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
    color: var(--color-gray-600);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.av-view-toggle__btn:hover {
    color: var(--color-gray-900);
}

.av-view-toggle__btn--active,
.av-view-toggle__btn--active:hover {
    background: var(--color-white);
    color: var(--color-gray-800);
    box-shadow: 0 1px 2px rgb(from var(--color-gray-900) r g b / 0.10);
}

.av-view-toggle__btn .mud-icon-root {
    width: 16px;
    height: 16px;
    font-size: 16px;
    color: inherit;
}

html.dark .av-view-toggle__btn {
    color: var(--color-dark-200);
}

html.dark .av-view-toggle__btn:hover {
    color: var(--color-dark-50);
}

html.dark .av-view-toggle__btn--active,
html.dark .av-view-toggle__btn--active:hover {
    background: var(--surface-2);
    color: var(--color-dark-100);
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.30);
}

/* ============================================================================
   Boxed Tabs (.av-boxed-tabs)

   Pill-style tab strip: gray rounded container with each tab as an inline pill;
   active tab fills with white + soft shadow; inactive tabs are transparent and
   only change text color on hover/focus. Mirrors the Tailux "boxed" tab pattern
   (the JSX form is `bg-gray-200 rounded-lg p-1` container + `bg-white shadow-sm`
   per active button).

   Apply as the Class on a <MudTabs> — works alongside MudTabPanel exactly like
   .av-page-tabs (same Mud-internal selectors). Reusable anywhere a compact
   segment-control reads better than an underline tab row: sub-navigation inside
   cards, filter mode switches, list-view selectors.
   ============================================================================ */

.av-boxed-tabs.mud-tabs,
.av-boxed-tabs {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    overflow: visible !important;
}

/* The gray bar that holds the buttons. Mud names this layer
   `.mud-tabs-toolbar` (outer flex) / `.mud-tabs-tabbar` (inner row) /
   `.mud-tabs-tabbar-inner` (the actual flex row that hosts the .mud-tab
   buttons — Mud sets min-height:48px on this one, so it's the layer that
   makes the pill look tall if we miss it).

   Renders FULL-WIDTH (width: 100%, no rounded corners). When the strip sits
   inside .av-page-card, the card's overflow:hidden + radius:--radius-xl
   clip the top corners cleanly so the strip reads as the card's head. For
   the floating standalone variant (`fit-content` rounded pill from Tailux)
   we'd add a modifier — leaving that as a follow-up if/when needed. */
.av-boxed-tabs .mud-tabs-toolbar,
.av-boxed-tabs .mud-tabs-tabbar,
.av-boxed-tabs .mud-tabs-tabbar-wrapper {
    background: var(--color-gray-200) !important;
    color: var(--color-gray-600);
    border: none !important;
    border-radius: 0 !important;
    padding: 4px !important;
    margin: 0 !important;
    min-height: auto !important;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    box-shadow: none !important;
}

/* tabbar-inner is the actual flex row — Mud hardcodes min-height:48px here.
   Override AND let the .mud-tab paddings drive the final height. */
.av-boxed-tabs .mud-tabs-tabbar-inner,
.av-boxed-tabs .mud-tabs-tabbar-content {
    min-height: auto !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

.av-boxed-tabs .mud-tabs-toolbar::-webkit-scrollbar,
.av-boxed-tabs .mud-tabs-tabbar::-webkit-scrollbar,
.av-boxed-tabs .mud-tabs-tabbar-wrapper::-webkit-scrollbar {
    display: none;
}

html.dark .av-boxed-tabs .mud-tabs-toolbar,
html.dark .av-boxed-tabs .mud-tabs-tabbar,
html.dark .av-boxed-tabs .mud-tabs-tabbar-wrapper {
    background: var(--color-dark-900) !important;
    color: var(--color-dark-200);
}

/* Each tab — pill geometry, transparent at rest, no border. */
.av-boxed-tabs.mud-tabs .mud-tab,
.av-boxed-tabs .mud-tab {
    padding: 6px 12px !important;
    margin: 0 !important;
    min-height: auto !important;
    border: none !important;
    border-radius: var(--radius-lg) !important;
    color: var(--color-gray-600) !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    opacity: 1 !important;
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    transition: background-color 150ms ease, color 150ms ease, box-shadow 150ms ease !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

html.dark .av-boxed-tabs.mud-tabs .mud-tab,
html.dark .av-boxed-tabs .mud-tab {
    color: var(--color-dark-200) !important;
}

/* Hover / focus on an INACTIVE tab — only the text darkens; no background fill
   (that's reserved for the active state). */
.av-boxed-tabs.mud-tabs .mud-tab:hover,
.av-boxed-tabs.mud-tabs .mud-tab:focus,
.av-boxed-tabs.mud-tabs .mud-tab:focus-visible,
.av-boxed-tabs.mud-tabs .mud-tab:active,
.av-boxed-tabs .mud-tab:hover,
.av-boxed-tabs .mud-tab:focus,
.av-boxed-tabs .mud-tab:focus-visible,
.av-boxed-tabs .mud-tab:active {
    color: var(--color-gray-800) !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    outline: none !important;
}

html.dark .av-boxed-tabs .mud-tab:hover,
html.dark .av-boxed-tabs .mud-tab:focus,
html.dark .av-boxed-tabs .mud-tab:focus-visible {
    color: var(--color-dark-100) !important;
}

/* Active tab — white pill, soft shadow, dark text. The hover/focus variants
   are repeated so the active pill never loses its fill when the user mouses
   over or focuses it again. */
.av-boxed-tabs.mud-tabs .mud-tab.mud-tab-active,
.av-boxed-tabs.mud-tabs .mud-tab.mud-tab-active:hover,
.av-boxed-tabs.mud-tabs .mud-tab.mud-tab-active:focus,
.av-boxed-tabs .mud-tab.mud-tab-active,
.av-boxed-tabs .mud-tab.mud-tab-active:hover,
.av-boxed-tabs .mud-tab.mud-tab-active:focus {
    color: var(--color-gray-800) !important;
    background: var(--color-white) !important;
    box-shadow: 0 1px 2px rgb(from var(--color-gray-900) r g b / 0.10) !important;
}

html.dark .av-boxed-tabs.mud-tabs .mud-tab.mud-tab-active,
html.dark .av-boxed-tabs.mud-tabs .mud-tab.mud-tab-active:hover,
html.dark .av-boxed-tabs.mud-tabs .mud-tab.mud-tab-active:focus,
html.dark .av-boxed-tabs .mud-tab.mud-tab-active,
html.dark .av-boxed-tabs .mud-tab.mud-tab-active:hover,
html.dark .av-boxed-tabs .mud-tab.mud-tab-active:focus {
    color: var(--color-dark-100) !important;
    background: var(--surface-2) !important;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.30) !important;
}

/* The boxed design fills the active tab with background, so the underline
   slider Mud draws between tabs has to go. */
.av-boxed-tabs .mud-tab-slider {
    display: none !important;
}

/* Icon + label rendered inline (Mud stacks them by default). 18px icon
   matches the av-page-tabs sibling so the family reads consistent. */
.av-boxed-tabs .mud-tab .mud-tab-icon-text {
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
}

.av-boxed-tabs .mud-tab .mud-icon-root,
.av-boxed-tabs .mud-tab .mud-tab-icon {
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
}

/* Strip Mud's ripple + hover halos — the pill's bg + shadow IS the feedback. */
.av-boxed-tabs .mud-tab .mud-ripple,
.av-boxed-tabs .mud-tab .mud-ripple-visual,
.av-boxed-tabs .mud-tab .mud-ripple-container,
.av-boxed-tabs .mud-tab::before,
.av-boxed-tabs .mud-tab::after {
    display: none !important;
    background: transparent !important;
}

/* avalme-legacy.css and avalme.css ship a legacy rule
   `.mud-tabs .mud-tooltip-root.mud-tooltip-inline { margin: 0 4px 10px; }`
   that adds 4 px horizontal + 10 px bottom margin to each MudTabPanel's
   tooltip wrapper. That margin is what pushes the boxed pills apart from
   the gray bar edges and adds extra height at the bottom. Reset it here so
   the boxed strip sits flush with the card and the pills only have the
   internal padding we control. */
.av-boxed-tabs .mud-tabs-tabbar .mud-tooltip-root.mud-tooltip-inline,
.av-boxed-tabs .mud-tabs-tabbar-inner .mud-tooltip-root.mud-tooltip-inline,
.av-boxed-tabs .mud-tooltip-root.mud-tooltip-inline {
    margin: 0 !important;
}

.av-boxed-tabs .mud-tab > *,
.av-boxed-tabs .mud-tab .mud-tab-icon-text,
.av-boxed-tabs .mud-tab .mud-button-label,
.av-boxed-tabs .mud-tab .mud-tab-text-wrapper {
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
}

/* Label typography — same scale as av-page-tabs for visual continuity. */
.av-boxed-tabs .mud-tab .mud-button-label {
    font-family: var(--font-sans) !important;
    font-size: var(--text-sm) !important;
    font-weight: var(--font-weight-medium, 500) !important;
    line-height: 1.2 !important;
}

/* Disabled — same opacity hint as av-page-tabs */
.av-boxed-tabs .mud-tab.mud-disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
}

/* Breathing room above the panel content. */
.av-boxed-tabs .mud-tabs-panels {
    padding-top: 16px;
}

/* When the boxed strip is the FIRST child of .av-page-card it acts as the
   card's head: the gray bar fills width 100 %, hugs the top + side edges of
   the card, and the card's overflow:hidden + radius round its top corners
   automatically. Cancel the card's default top padding (10 px) so the strip
   is flush with the top border — but ONLY when it's the first child. Cards
   that still use .av-page-tabs (underline) keep their top breath because the
   `:has()` selector doesn't match them. */
.av-page-card:has(> .av-boxed-tabs:first-child),
.av-page-card:has(> .mud-tabs.av-boxed-tabs:first-child) {
    padding-top: 0;
}

/* ============================================================================
   Page Card (.av-page-card)

   Reusable page-level card surface — hosts a .av-page-tabs row at the top
   and the panel content below. Consumed by tab-based pages (EditTenant,
   AddTenant, AddTenantWizard, Contacts dashboard, and any future multi-tab
   list / edit / wizard view). Replaces the "floating-on-app-background"
   look with a proper card surface that visually scopes the content.

   Previously named .av-page-card — renamed to .av-page-card so the
   name matches the family (.av-page-header, .av-page-filters, .av-page-card)
   and stops misleading readers into thinking it's edit-only.
   ============================================================================ */

.av-page-card.mud-paper,
.av-page-card {
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-xl);
    padding: 0;
    padding-top: 10px;
    overflow: hidden;
}

html.dark .av-page-card.mud-paper,
html.dark .av-page-card {
    background: var(--color-dark-700);
    border-color: var(--color-dark-500);
}

/* Tab toolbar sits flush with the card top, divider matches card border */
.av-page-card .av-page-tabs {
    padding: 0 12px;
    border-bottom-color: var(--color-gray-200);
}

html.dark .av-page-card .av-page-tabs {
    border-bottom-color: var(--color-dark-500);
}

/* Panel body — generous padding for the form sections */
.av-page-card .mud-tabs-panels {
    padding: 24px;
}

@media (max-width: 640px) {
    .av-page-card .mud-tabs-panels {
        padding: 16px;
    }
}

/* Footer divider + actions row inside the card */
.av-page-card__divider {
    margin: 0 !important;
    border-color: var(--color-gray-200) !important;
}

html.dark .av-page-card__divider {
    border-color: var(--color-dark-500) !important;
}

.av-page-card__actions {
    padding: 16px 24px !important;
    justify-content: flex-end !important;
    background: var(--surface-1);
}

html.dark .av-page-card__actions {
    background: var(--color-dark-750);
}

@media (max-width: 640px) {
    .av-page-card__actions {
        padding: 12px 16px !important;
    }
}

/* Page-level submit/cancel buttons — visually identical to the dialog skin
   (pill outline + pill solid primary) so the editing language stays consistent
   between modal and full-page flows. */
.av-page-card__btn-cancel.mud-button-root,
.av-page-card__btn-action.mud-button-root {
    height: 38px;
    min-width: 7rem;
    padding: 0 18px;
    border-radius: 9999px !important;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: none;
}

.av-page-card__btn-cancel.mud-button-root .mud-button-label,
.av-page-card__btn-action.mud-button-root .mud-button-label {
    font-weight: 500;
}

.av-page-card__btn-cancel.mud-button-root {
    background: transparent;
    border: 1px solid var(--color-gray-300);
    color: var(--color-gray-700);
}

.av-page-card__btn-cancel.mud-button-root:hover {
    background: var(--color-gray-100);
    border-color: var(--color-gray-400);
    box-shadow: none;
}

html.dark .av-page-card__btn-cancel.mud-button-root {
    background: transparent;
    border-color: var(--color-dark-400);
    color: var(--color-dark-100);
}

html.dark .av-page-card__btn-cancel.mud-button-root:hover {
    background: var(--color-dark-600);
}

.av-page-card__btn-action.mud-button-root {
    background: var(--color-primary-600) !important;
    color: var(--color-white) !important;
    border: 1px solid var(--color-primary-600) !important;
}

.av-page-card__btn-action.mud-button-root:hover {
    background: var(--color-primary-700) !important;
    border-color: var(--color-primary-700) !important;
    box-shadow: none;
}

html.dark .av-page-card__btn-action.mud-button-root {
    background: var(--color-primary-500) !important;
    border-color: var(--color-primary-500) !important;
}

html.dark .av-page-card__btn-action.mud-button-root:hover {
    background: var(--color-primary-400) !important;
    border-color: var(--color-primary-400) !important;
}

.av-page-card__btn-cancel.mud-button-root.mud-button-disabled,
.av-page-card__btn-action.mud-button-root.mud-button-disabled,
.av-page-card__btn-cancel.mud-button-root[disabled],
.av-page-card__btn-action.mud-button-root[disabled] {
    opacity: 0.7;
    pointer-events: none;
}

.av-page-card__btn-spinner {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

/* ============================================================================
 Edit Page Card (.av-edit-page-card)

 Reusable container for multi-tab edit pages (EditTenant, future
 EditContact, EditUser, etc.). Provides the surface that hosts a
 .av-page-tabs row at the top and the panel content below. Replaces the
 "floating-on-app-background" look with a proper card surface that scopes
 the form visually.
 ============================================================================ */

.av-edit-page-card.mud-paper,
.av-edit-page-card {
 background: var(--color-white);
 border: 1px solid var(--color-gray-200);
 border-radius: var(--radius-xl);
 padding: 0;
 padding-top: 10px;
 overflow: hidden;
}

html.dark .av-edit-page-card.mud-paper,
html.dark .av-edit-page-card {
 background: var(--color-dark-700);
 border-color: var(--color-dark-500);
}

/* Tab toolbar sits flush with the card top, divider matches card border */
.av-edit-page-card .av-page-tabs {
 padding: 0 12px;
 border-bottom-color: var(--color-gray-200);
}

html.dark .av-edit-page-card .av-page-tabs {
 border-bottom-color: var(--color-dark-500);
}

/* Panel body — generous padding for the form sections */
.av-edit-page-card .mud-tabs-panels {
 padding: 24px;
}

@media (max-width: 640px) {
 .av-edit-page-card .mud-tabs-panels {
 padding: 16px;
 }
}

/* Footer divider + actions row inside the card */
.av-edit-page-card__divider {
 margin: 0 !important;
 border-color: var(--color-gray-200) !important;
}

html.dark .av-edit-page-card__divider {
 border-color: var(--color-dark-500) !important;
}

.av-edit-page-card__actions {
 padding: 16px 24px !important;
 justify-content: flex-end !important;
 background: var(--surface-1);
}

html.dark .av-edit-page-card__actions {
 background: var(--color-dark-750);
}

@media (max-width: 640px) {
 .av-edit-page-card__actions {
 padding: 12px 16px !important;
 }
}

/* Page-level submit/cancel buttons — visually identical to the dialog skin
 (pill outline + pill solid primary) so the editing language stays consistent
 between modal and full-page flows. */
.av-edit-page-card__btn-cancel.mud-button-root,
.av-edit-page-card__btn-action.mud-button-root {
 height: 38px;
 min-width: 7rem;
 padding: 0 18px;
 border-radius: 9999px !important;
 font-weight: 500;
 text-transform: none;
 letter-spacing: 0;
 box-shadow: none;
}

.av-edit-page-card__btn-cancel.mud-button-root .mud-button-label,
.av-edit-page-card__btn-action.mud-button-root .mud-button-label {
 font-weight: 500;
}

.av-edit-page-card__btn-cancel.mud-button-root {
 background: transparent;
 border: 1px solid var(--color-gray-300);
 color: var(--color-gray-700);
}

.av-edit-page-card__btn-cancel.mud-button-root:hover {
 background: var(--color-gray-100);
 border-color: var(--color-gray-400);
 box-shadow: none;
}

html.dark .av-edit-page-card__btn-cancel.mud-button-root {
 background: transparent;
 border-color: var(--color-dark-400);
 color: var(--color-dark-100);
}

html.dark .av-edit-page-card__btn-cancel.mud-button-root:hover {
 background: var(--color-dark-600);
}

.av-edit-page-card__btn-action.mud-button-root {
 background: var(--color-primary-600) !important;
 color: var(--color-white) !important;
 border: 1px solid var(--color-primary-600) !important;
}

.av-edit-page-card__btn-action.mud-button-root:hover {
 background: var(--color-primary-700) !important;
 border-color: var(--color-primary-700) !important;
 box-shadow: none;
}

html.dark .av-edit-page-card__btn-action.mud-button-root {
 background: var(--color-primary-500) !important;
 border-color: var(--color-primary-500) !important;
}

html.dark .av-edit-page-card__btn-action.mud-button-root:hover {
 background: var(--color-primary-400) !important;
 border-color: var(--color-primary-400) !important;
}

.av-edit-page-card__btn-cancel.mud-button-root.mud-button-disabled,
.av-edit-page-card__btn-action.mud-button-root.mud-button-disabled,
.av-edit-page-card__btn-cancel.mud-button-root[disabled],
.av-edit-page-card__btn-action.mud-button-root[disabled] {
 opacity: 0.7;
 pointer-events: none;
}

.av-edit-page-card__btn-spinner {
 width: 16px;
 height: 16px;
 margin-right: 8px;
}

/* ============================================================================
 Form sections (.av-form-section)

   Grouped fields inside a form-hosting surface (.av-page-card OR a plain
   page). Each section has an eyebrow title and a responsive 2-column field
   grid. Add a single full-width row with .av-form-section__fields--single.
   ============================================================================ */
 Grouped fields inside a form-hosting surface (.av-edit-page-card OR a plain
 page). Each section has an eyebrow title and a responsive 2-column field
 grid. Add a single full-width row with .av-form-section__fields--single.
 ============================================================================ */

.av-form-sections {
 display: flex;
 flex-direction: column;
 gap: 28px;
 max-width: 880px;
 width: 100%;
}

.av-form-section {
 display: flex;
 flex-direction: column;
 gap: 12px;
}

.av-form-section__title.mud-typography {
 color: var(--color-gray-500);
}

html.dark .av-form-section__title.mud-typography {
 color: var(--color-dark-300);
}

.av-form-section__fields {
 display: grid;
 grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
 gap: 16px 20px;
}

/* Spans the whole row when a field needs the full width */
.av-form-section__fields > .av-form-section__field--full {
 grid-column: 1 / -1;
}

/* Variant: single-column layout (Address-only sections) */
.av-form-section__fields--single {
 grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 640px) {
 .av-form-section__fields {
 grid-template-columns: minmax(0, 1fr);
 gap: 12px;
 }
}

/* Optional thin divider between sections (used selectively) */
.av-form-section + .av-form-section {
 padding-top: 24px;
 border-top: 1px solid var(--color-gray-100);
}

html.dark .av-form-section + .av-form-section {
 border-top-color: var(--color-dark-600);
}

/* Header row for a form section (icon + title). Sits above the section body
   with the section's own 12 px gap; the title is rendered as Typo.subtitle2
   in markup so this block only owns the icon color. */
.av-form-section__head .mud-icon-root {
    color: var(--color-gray-500);
}

html.dark .av-form-section__head .mud-icon-root {
    color: var(--color-dark-300);
}

/* 3-column row used inside .av-form-fields. Collapses to 1 col below 640 px
   so the form behaves on phones. */
.av-form-row-3 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
}

@media (max-width: 640px) {
    .av-form-row-3 {
        grid-template-columns: 1fr;
    }
}

/* — Compact adornment icons inside form-section inputs — — — — — — — — — — */
/* Mud renders adornment icons at 24x24 by default which feels heavy inside
 Dense+Outlined inputs. We scale them to 18x18 and dim the color a touch. */

.av-form-section .mud-input-adornment .mud-icon-root,
.av-form-section .mud-input-adornment-end .mud-icon-root,
.av-form-section .mud-input-adornment-start .mud-icon-root {
 width: 18px !important;
 height: 18px !important;
 font-size: 18px !important;
}

.av-form-section .mud-input-adornment-icon-button {
 padding: 4px !important;
}

.av-form-section .mud-input-adornment .mud-icon-default {
 color: var(--color-gray-500);
}

html.dark .av-form-section .mud-input-adornment .mud-icon-default {
 color: var(--color-dark-300);
}

/* PhoneInputIntl visual parity — see canonical section below
   (`.av-phone-input`), which now owns ALL the phone-input styles using
   Avalme tokens (theme-customizer aware). This stub is intentionally empty;
   the old `.phone-input-shrink` / `.phone-margin-*` selectors were retired. */
/* — PhoneInputIntl visual parity with sibling MudTextField (Outlined+Dense) — */
/* The shared phone-input-shrink CSS lives in PhoneInputIntl.razor with mud-palette
 variables. These extras align its outlined border with our Outlined inputs and
 bring the country flag column to the same height as Dense rows. */

.av-form-section .phone-input .iti__tel-input {
 font-size: var(--text-sm) !important;
 line-height: 1.4375 !important;
}

.av-form-section .phone-input.phone-margin-dense .iti__tel-input {
 padding-top: 9px !important;
 padding-bottom: 9px !important;
}

/* The native <input> rendered by intl-tel-input draws its own focus outline
 on top of Mud's outlined border, producing a thicker / darker double border
 compared to sibling MudTextFields. Suppress the native outline so only Mud's
 outlined-border state machine paints the focus ring. */
.av-form-section .phone-input .iti__tel-input:focus,
.av-form-section .phone-input .iti__tel-input:focus-visible,
.av-form-section .phone-input .iti__tel-input:focus-within {
 outline: none !important;
 box-shadow: none !important;
}

/* Same for the intl-tel-input container that sometimes paints a thin border. */
.av-form-section .phone-input .iti {
 outline: none !important;
}

/* ============================================================================
 Address card (.av-address-card)

 Read-only display card for an address, with an inline Edit affordance that
 opens the address picker dialog. Visual parity with the legacy crm-prop-section
 addresses card but rebuilt on top of design tokens — no --mud-palette-* vars,
 no inline font sizes. Typography is owned by Typo.X (overline / body1 / body2).
 ============================================================================ */

.av-address-card {
 display: flex;
 flex-direction: column;
 gap: 16px;
 padding: 16px 20px 20px;
 background: var(--color-white);
 border: 1px solid var(--color-gray-200);
 border-radius: var(--radius-xl);
 box-shadow: 0 1px 2px rgb(from var(--color-gray-900) r g b / 0.04);
 transition: border-color 150ms ease, box-shadow 150ms ease;
}

.av-address-card:hover {
 border-color: var(--color-gray-300);
}

html.dark .av-address-card {
 background: var(--color-dark-700);
 border-color: var(--color-dark-500);
 box-shadow: 0 1px 2px rgb(0 0 0 / 0.25);
}

html.dark .av-address-card:hover {
 border-color: var(--color-dark-400);
}

.av-address-card__head {
 display: flex;
 align-items: flex-start;
 gap: 12px;
 padding-bottom: 12px;
 border-bottom: 1px dashed var(--color-gray-200);
}

html.dark .av-address-card__head {
 border-bottom-color: var(--color-dark-500);
}

.av-address-card__icon {
 flex-shrink: 0;
 width: 36px;
 height: 36px;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 border-radius: var(--radius-md);
 background: rgb(from var(--color-primary-600) r g b / 0.12);
 color: var(--color-primary-600);
}

.av-address-card__icon .mud-icon-root {
 width: 18px;
 height: 18px;
}

html.dark .av-address-card__icon {
 background: rgb(from var(--color-primary-400) r g b / 0.18);
 color: var(--color-primary-300);
}

.av-address-card__head-text {
 flex: 1 1 auto;
 min-width: 0;
 display: flex;
 flex-direction: column;
 gap: 2px;
}

.av-address-card__title.mud-typography {
 color: var(--color-gray-900);
}

html.dark .av-address-card__title.mud-typography {
 color: var(--color-dark-50);
}

.av-address-card__hint.mud-typography {
 color: var(--color-gray-600);
 overflow: hidden;
 text-overflow: ellipsis;
 display: -webkit-box;
 -webkit-line-clamp: 2;
 -webkit-box-orient: vertical;
}

html.dark .av-address-card__hint.mud-typography {
 color: var(--color-dark-200);
}

/* County pill — surfaces the working-jurisdiction metadata in the head so
 users see it before scrolling to the grid. Compact, primary-tinted. */
.av-address-card__county-pill {
 display: inline-flex;
 align-items: center;
 gap: 6px;
 padding: 3px 10px 3px 6px;
 margin-top: 6px;
 border-radius: 9999px;
 background: rgb(from var(--color-primary-600) r g b / 0.08);
 color: var(--color-primary-700);
 align-self: flex-start;
 max-width: 100%;
}

.av-address-card__county-pill .mud-icon-root {
 width: 14px;
 height: 14px;
 flex-shrink: 0;
}

.av-address-card__county-pill .mud-typography {
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}

.av-address-card__county-pill .av-address-card__county-label.mud-typography {
 color: var(--color-primary-600);
 margin-right: 2px;
}

.av-address-card__county-pill .av-address-card__county-value.mud-typography {
 color: var(--color-primary-800);
 font-weight: 500;
}

html.dark .av-address-card__county-pill {
 background: rgb(from var(--color-primary-400) r g b / 0.18);
 color: var(--color-primary-200);
}

html.dark .av-address-card__county-pill .av-address-card__county-label.mud-typography {
 color: var(--color-primary-300);
}

html.dark .av-address-card__county-pill .av-address-card__county-value.mud-typography {
 color: var(--color-primary-100);
}

/* ============================================================================
 Logo upload — Brand identity tab inside EditTenant

 A two-zone container: a centered preview (rectangle 200×200 with subtle
 border, or dashed empty state when no logo) and a hints column with the
 format / size / dimensions guidance. The BpFileUpload component sits in the
 middle untouched — we just give it a nicer frame.
 ============================================================================ */

.av-logo-upload {
 display: grid;
 grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
 gap: 32px;
 align-items: start;
 max-width: 880px;
 width: 100%;
 position: relative; /* anchor for the progress bar overlay */
}

@media (max-width: 880px) {
 .av-logo-upload {
 grid-template-columns: minmax(0, 1fr);
 gap: 24px;
 }
}

/* — Preview column — — — — — — — — — — — — — — — — — — — — — — — — — — — */

.av-logo-upload__preview-col {
 display: flex;
 flex-direction: column;
 align-items: center;
 gap: 16px;
 min-width: 0;
}

.av-logo-upload__preview {
 width: 220px;
 height: 220px;
 display: flex;
 align-items: center;
 justify-content: center;
 border: 1px solid var(--color-gray-200);
 border-radius: var(--radius-xl);
 background: var(--color-gray-50);
 overflow: hidden;
 transition: border-color 150ms ease, box-shadow 150ms ease;
}

.av-logo-upload__preview:hover {
 border-color: var(--color-gray-300);
 box-shadow: 0 1px 2px rgb(from var(--color-gray-900) r g b / 0.04);
}

html.dark .av-logo-upload__preview {
 background: var(--color-dark-800);
 border-color: var(--color-dark-500);
}

html.dark .av-logo-upload__preview:hover {
 border-color: var(--color-dark-400);
}

/* Variant: dashed empty drop-zone feel when there's no logo yet */
.av-logo-upload__preview--empty {
 border-style: dashed;
 border-width: 2px;
}

/* MudImage renders an inner <img>. Without explicit sizing the img can render
 as 0×0 inside a flex parent until the image loads, so the preview reads as
 empty. Forcing display:block + max-width/max-height keeps the natural
 aspect ratio while filling the 220×220 frame on load. */
.av-logo-upload__preview img,
.av-logo-upload__preview .mud-image,
.av-logo-upload__preview .mud-image img {
 display: block;
 max-width: 100%;
 max-height: 100%;
 width: auto;
 height: auto;
 object-fit: contain;
}

/* Small padding so the logo doesn't kiss the frame edges. */
.av-logo-upload__preview:not(.av-logo-upload__preview--empty) {
 padding: 12px;
}

/* Empty placeholder content (icon + label) */
.av-logo-upload__empty {
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 gap: 12px;
 padding: 16px;
 text-align: center;
 color: var(--color-gray-500);
}

.av-logo-upload__empty .mud-icon-root {
 width: 56px;
 height: 56px;
}

html.dark .av-logo-upload__empty {
 color: var(--color-dark-300);
}

.av-logo-upload__empty-title.mud-typography {
 color: var(--color-gray-700);
}

html.dark .av-logo-upload__empty-title.mud-typography {
 color: var(--color-dark-100);
}

.av-logo-upload__empty-hint.mud-typography {
 color: var(--color-gray-500);
 max-width: 200px;
}

html.dark .av-logo-upload__empty-hint.mud-typography {
 color: var(--color-dark-300);
}

/* — Tips column — — — — — — — — — — — — — — — — — — — — — — — — — — — — */

.av-logo-upload__tips {
 display: flex;
 flex-direction: column;
 gap: 16px;
 min-width: 0;
}

.av-logo-upload__tips-list {
 display: flex;
 flex-direction: column;
 gap: 10px;
 margin: 0;
 padding: 0;
 list-style: none;
}

.av-logo-upload__tip {
 display: flex;
 align-items: flex-start;
 gap: 10px;
 padding: 0;
 margin: 0;
}

.av-logo-upload__tip-icon {
 flex-shrink: 0;
 width: 24px;
 height: 24px;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 border-radius: 9999px;
 background: rgb(from var(--color-primary-600) r g b / 0.10);
 color: var(--color-primary-600);
 margin-top: 1px;
}

.av-logo-upload__tip-icon .mud-icon-root {
 width: 14px;
 height: 14px;
}

html.dark .av-logo-upload__tip-icon {
 background: rgb(from var(--color-primary-400) r g b / 0.18);
 color: var(--color-primary-300);
}

.av-logo-upload__tip-text {
 flex: 1 1 auto;
 min-width: 0;
}

.av-logo-upload__tip-text .av-logo-upload__tip-label.mud-typography {
 color: var(--color-gray-800);
 display: block;
}

html.dark .av-logo-upload__tip-text .av-logo-upload__tip-label.mud-typography {
 color: var(--color-dark-50);
}

.av-logo-upload__tip-text .av-logo-upload__tip-value.mud-typography {
 color: var(--color-gray-600);
}

html.dark .av-logo-upload__tip-text .av-logo-upload__tip-value.mud-typography {
 color: var(--color-dark-200);
}

/* — Selected file panel (below the tips list, right column) — — — — — — — */

.av-logo-upload__file {
 display: flex;
 flex-direction: column;
 gap: 8px;
 margin-top: 8px;
 padding: 12px 14px;
 background: var(--color-gray-50);
 border: 1px solid var(--color-gray-200);
 border-radius: var(--radius-md);
}

html.dark .av-logo-upload__file {
 background: var(--color-dark-800);
 border-color: var(--color-dark-500);
}

.av-logo-upload__file-title.mud-typography {
 color: var(--color-gray-500);
}

html.dark .av-logo-upload__file-title.mud-typography {
 color: var(--color-dark-300);
}

.av-logo-upload__file-list {
 display: flex;
 flex-direction: column;
 gap: 6px;
 margin: 0;
 padding: 0;
}

.av-logo-upload__file-row {
 display: flex;
 align-items: center;
 gap: 8px;
 min-width: 0;
}

.av-logo-upload__file-icon.mud-icon-root {
 width: 14px;
 height: 14px;
 color: var(--color-gray-500);
 flex-shrink: 0;
}

html.dark .av-logo-upload__file-icon.mud-icon-root {
 color: var(--color-dark-300);
}

.av-logo-upload__file-value.mud-typography {
 color: var(--color-gray-800);
 font-family: var(--font-mono);
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}

html.dark .av-logo-upload__file-value.mud-typography {
 color: var(--color-dark-100);
}

/* Frame for the BpFileUpload — collapses the component's default heavy
 spacing into something that lives nicely below the preview. */
.av-logo-upload__uploader {
 width: 100%;
 max-width: 320px;
 display: flex;
 justify-content: center;
}

.av-logo-upload__uploader .mud-list-item {
 padding-top: 0;
 padding-bottom: 0;
}

/* Progress bar — sits directly below the preview frame, matching its width.
 Only visible while an upload is in flight (HideProgressBarWhenIdle="true"
 on the BpFileUpload). Lives inline in the preview-col flex stack — no
 absolute positioning so it never overlaps the toolbar above. */
.av-logo-upload .bp-file-upload-progress.mud-progress-linear {
 width: 220px;
 margin: -8px auto 4px !important; /* pull up a touch so it kisses the preview */
 height: 6px !important;
 border-radius: 9999px !important;
 overflow: hidden;
}

.av-logo-upload .bp-file-upload-progress.mud-progress-linear .mud-progress-linear-bar {
 background: var(--color-primary-600) !important;
}

html.dark .av-logo-upload .bp-file-upload-progress.mud-progress-linear {
 box-shadow: 0 2px 8px rgb(0 0 0 / 0.4);
}

html.dark .av-logo-upload .bp-file-upload-progress.mud-progress-linear .mud-progress-linear-bar {
 background: var(--color-primary-400) !important;
}

/* — Uploader buttons (Upload / Clear / Remove) styled with the new tokens.
 We don't touch the BpFileUpload component to keep its 12+ other call-sites
 intact; instead we override its Mud buttons only when they live inside
 .av-logo-upload__uploader. */

.av-logo-upload__uploader .mud-button-root {
 border-radius: 9999px !important;
 text-transform: none !important;
 letter-spacing: 0 !important;
 padding: 6px 16px !important;
 min-height: 36px !important;
 box-shadow: none !important;
 margin: 0 4px !important;
 transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.av-logo-upload__uploader .mud-button-root .mud-button-label {
 font-weight: 500;
}

/* Upload logo button — primary outlined */
.av-logo-upload__uploader .mud-button-root.mud-button-outlined-primary {
 color: var(--color-primary-600) !important;
 border: 1px solid var(--color-primary-200) !important;
 background: rgb(from var(--color-primary-600) r g b / 0.04) !important;
}

.av-logo-upload__uploader .mud-button-root.mud-button-outlined-primary:hover {
 background: rgb(from var(--color-primary-600) r g b / 0.10) !important;
 border-color: var(--color-primary-300) !important;
}

html.dark .av-logo-upload__uploader .mud-button-root.mud-button-outlined-primary {
 color: var(--color-primary-300) !important;
 border-color: rgb(from var(--color-primary-400) r g b / 0.35) !important;
 background: rgb(from var(--color-primary-400) r g b / 0.06) !important;
}

html.dark .av-logo-upload__uploader .mud-button-root.mud-button-outlined-primary:hover {
 background: rgb(from var(--color-primary-400) r g b / 0.14) !important;
 border-color: var(--color-primary-400) !important;
}

/* Clear button — error outlined */
.av-logo-upload__uploader .mud-button-root.mud-button-outlined-error {
 color: var(--color-error) !important;
 border: 1px solid rgb(from var(--color-error) r g b / 0.32) !important;
 background: transparent !important;
}

.av-logo-upload__uploader .mud-button-root.mud-button-outlined-error:hover {
 background: rgb(from var(--color-error) r g b / 0.08) !important;
 border-color: var(--color-error) !important;
}

/* Remove / cancel button — warning outlined */
.av-logo-upload__uploader .mud-button-root.mud-button-outlined-warning {
 color: var(--color-warning) !important;
 border: 1px solid rgb(from var(--color-warning) r g b / 0.32) !important;
 background: transparent !important;
}

.av-logo-upload__uploader .mud-button-root.mud-button-outlined-warning:hover {
 background: rgb(from var(--color-warning) r g b / 0.08) !important;
 border-color: var(--color-warning) !important;
}

/* The BpFileUpload uses MudButton with HtmlTag="label" and the ma-2 utility.
 Reset the extra margin so our spacing rules win. */
.av-logo-upload__uploader .ma-2 {
 margin: 0 4px !important;
}

/* Inline file-info list rendered after a successful pick — make it compact
 and align with the rest of the card. */
.av-logo-upload__uploader .mud-list-item .mud-list-item-icon {
 min-width: 24px !important;
}

.av-logo-upload__uploader .mud-list-item .mud-icon-root {
 width: 14px !important;
 height: 14px !important;
}

.av-logo-upload__uploader .mud-list-item code {
 font-size: var(--text-xs);
 color: var(--color-gray-700);
 background: transparent;
 padding: 0;
}

html.dark .av-logo-upload__uploader .mud-list-item code {
 color: var(--color-dark-200);
}

/* ============================================================================
 Added services summary (.av-services-summary)

 Pill-list of services currently attached to the tenant. Shown above the
 selector table so the admin sees the working selection at a glance.
 Inactive services get a danger-tint accent badge.
 ============================================================================ */

.av-services-summary {
 display: flex;
 flex-direction: column;
 gap: 12px;
 padding: 16px 20px;
 background: rgb(from var(--color-primary-600) r g b / 0.04);
 border: 1px solid rgb(from var(--color-primary-600) r g b / 0.18);
 border-radius: var(--radius-xl);
}

html.dark .av-services-summary {
 background: rgb(from var(--color-primary-400) r g b / 0.08);
 border-color: rgb(from var(--color-primary-400) r g b / 0.24);
}

.av-services-summary__head {
 display: flex;
 align-items: center;
 gap: 10px;
}

.av-services-summary__icon {
 width: 28px;
 height: 28px;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 border-radius: 9999px;
 background: rgb(from var(--color-primary-600) r g b / 0.12);
 color: var(--color-primary-700);
}

.av-services-summary__icon .mud-icon-root {
 width: 16px;
 height: 16px;
}

html.dark .av-services-summary__icon {
 background: rgb(from var(--color-primary-400) r g b / 0.20);
 color: var(--color-primary-200);
}

.av-services-summary__count.mud-typography {
 color: var(--color-primary-700);
}

html.dark .av-services-summary__count.mud-typography {
 color: var(--color-primary-200);
}

.av-services-summary__label.mud-typography {
 color: var(--color-gray-600);
}

html.dark .av-services-summary__label.mud-typography {
 color: var(--color-dark-200);
}

.av-services-summary__chips {
 display: flex;
 flex-wrap: wrap;
 gap: 8px;
}

.av-services-summary__chip {
 display: inline-flex;
 align-items: center;
 gap: 6px;
 padding: 2px 3px 2px 10px;
 background: var(--color-white);
 border: 1px solid var(--color-gray-200);
 border-radius: 9999px;
 transition: border-color 150ms ease, box-shadow 150ms ease;
 line-height: 1;
}

.av-services-summary__chip:hover {
 border-color: var(--color-gray-300);
 box-shadow: 0 1px 2px rgb(from var(--color-gray-900) r g b / 0.04);
}

html.dark .av-services-summary__chip {
 background: var(--color-dark-700);
 border-color: var(--color-dark-500);
}

html.dark .av-services-summary__chip:hover {
 border-color: var(--color-dark-400);
}

.av-services-summary__chip-icon {
 width: 13px;
 height: 13px;
 color: var(--color-primary-600);
 flex-shrink: 0;
}

html.dark .av-services-summary__chip-icon {
 color: var(--color-primary-300);
}

.av-services-summary__chip-name.mud-typography {
 color: var(--color-gray-800);
 line-height: 1.1;
 font-size: var(--text-xs-plus);
}

html.dark .av-services-summary__chip-name.mud-typography {
 color: var(--color-dark-50);
}

.av-services-summary__chip-deactivated.mud-typography {
 color: var(--color-error);
 margin-left: 2px;
 font-style: italic;
 line-height: 1.1;
}

.av-services-summary__chip-remove.mud-icon-button {
 width: 18px !important;
 height: 18px !important;
 min-width: 18px !important;
 min-height: 18px !important;
 padding: 0 !important;
 display: inline-flex !important;
 align-items: center !important;
 justify-content: center !important;
 align-self: center;
 line-height: 0 !important;
 border-radius: 9999px;
 color: var(--color-gray-500);
 background: transparent;
 margin-left: 2px;
}

.av-services-summary__chip-remove.mud-icon-button .mud-icon-button-label {
 line-height: 0 !important;
 display: inline-flex;
 align-items: center;
 justify-content: center;
}

.av-services-summary__chip-remove.mud-icon-button:hover {
 background: rgb(from var(--color-error) r g b / 0.10);
 color: var(--color-error);
}

.av-services-summary__chip-remove.mud-icon-button .mud-icon-root {
 width: 11px !important;
 height: 11px !important;
}

html.dark .av-services-summary__chip-remove.mud-icon-button {
 color: var(--color-dark-300);
}

html.dark .av-services-summary__chip-remove.mud-icon-button:hover {
 background: rgb(from var(--color-error) r g b / 0.18);
 color: var(--color-error);
}

/* ============================================================================
 Empty-state panel (.av-empty-state)

 Reusable "nothing here yet" surface — icon disc + title + description +
 optional action button. Used as <NoRecordsContent> for MudTable, but also
 stands alone in cards/sections. The --compact modifier tightens vertical
 rhythm for in-table use.
 ============================================================================ */

.av-empty-state {
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 gap: 16px;
 padding: 48px 24px;
 text-align: center;
}

.av-empty-state--compact {
 gap: 12px;
 padding: 32px 16px;
}

.av-empty-state__icon-wrap {
 width: 64px;
 height: 64px;
 border-radius: 50%;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 background-color: var(--color-gray-100);
 color: var(--color-gray-500);
}

.av-empty-state--compact .av-empty-state__icon-wrap {
 width: 48px;
 height: 48px;
}

html.dark .av-empty-state__icon-wrap {
 background-color: var(--color-dark-700);
 color: var(--color-dark-300);
}

.av-empty-state__icon.mud-icon-root {
 width: 28px !important;
 height: 28px !important;
 font-size: 28px !important;
}

.av-empty-state--compact .av-empty-state__icon.mud-icon-root {
 width: 22px !important;
 height: 22px !important;
 font-size: 22px !important;
}

.av-empty-state__text {
 display: flex;
 flex-direction: column;
 gap: 4px;
 max-width: 360px;
}

.av-empty-state__title.mud-typography {
 color: var(--color-gray-800);
}

html.dark .av-empty-state__title.mud-typography {
 color: var(--color-dark-100);
}

.av-empty-state__description.mud-typography {
 color: var(--color-gray-500);
}

html.dark .av-empty-state__description.mud-typography {
 color: var(--color-dark-300);
}

.av-empty-state__action.mud-button-root {
 margin-top: 4px;
}

/* ============================================================================
 Guía Visual-style table (.av-tailux-table)

 Drop-in skin for MudTable that mimics the look of the Guía Visual ProductsTable:
 card wrapper, gray-100 head row with uppercase font-semibold cells, rounded
 corners on the first/last header column, hairline row dividers, hover tint,
 pill-shaped pagination at the bottom.
 ============================================================================ */

.av-tailux-table.mud-table,
.av-tailux-table .mud-table {
    background: transparent !important;
    box-shadow: none !important;
    /* Hairline outer border so the table reads as a bounded card even when
       it isn't wrapped in `.av-table-card`. When it IS wrapped, the override
       further down removes this border to avoid a double-line. */
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

html.dark .av-tailux-table.mud-table,
html.dark .av-tailux-table .mud-table {
    border-color: var(--color-dark-500);
}

/* Suppress the inner table border when wrapped in `.av-table-card` — the
   card already paints the outer 1 px line and corners, so the inner border
   would read as a double rule. */
.av-table-card .av-tailux-table.mud-table,
.av-table-card .av-tailux-table .mud-table {
    border: 0;
    border-radius: 0;
 background: transparent !important;
 box-shadow: none !important;
 border-radius: 0 !important;
}

.av-tailux-table .mud-table-container {
 border-radius: var(--radius-xl) var(--radius-xl) 0 0;
 overflow: hidden;
}

/* Header row */
.av-tailux-table .mud-table-head {
 background: var(--color-gray-200);
}

html.dark .av-tailux-table .mud-table-head {
 background: var(--color-dark-800);
}

.av-tailux-table .mud-table-head .mud-table-cell {
 color: var(--color-gray-800) !important;
 border-bottom: 1px solid var(--color-gray-200) !important;
 padding: 12px 16px !important;
}

html.dark .av-tailux-table .mud-table-head .mud-table-cell {
 color: var(--color-dark-100) !important;
 border-bottom-color: var(--color-dark-500) !important;
}

.av-tailux-table .mud-table-head .mud-table-cell,
.av-tailux-table .mud-table-head .mud-table-sort-label,
.av-tailux-table .mud-table-head .mud-table-cell .mud-button-label {
 font-size: var(--text-xs) !important;
 font-weight: 600 !important;
 text-transform: uppercase !important;
 letter-spacing: 0.04em !important;
}

.av-tailux-table .mud-table-head .mud-table-cell:first-child {
 border-top-left-radius: var(--radius-xl);
}

.av-tailux-table .mud-table-head .mud-table-cell:last-child {
 border-top-right-radius: var(--radius-xl);
}

html.dark .av-tailux-table .mud-table-head .mud-table-cell {
 color: var(--color-dark-100) !important;
 border-bottom-color: var(--color-dark-500) !important;
}

/* Body rows */
.av-tailux-table .mud-table-body .mud-table-row {
    transition: background-color 120ms ease;
    position: relative;
}

/* Selected row — Tailux courses-datatable pattern: tinted background +
   left-edge accent stripe with mitered top/bottom corners (the small triangle
   cuts come from the CSS border miter — 3px transparent border on top/right/
   bottom + 3px primary on the left, painted via ::after).

   Applied via RowClassFunc on MudTable when the row's id is in the
   SelectedContacts set. */
.av-tailux-table .mud-table-body .mud-table-row.av-tailux-row--selected {
    background: rgb(from var(--color-primary-500) r g b / 0.06) !important;
}

.av-tailux-table .mud-table-body .mud-table-row.av-tailux-row--selected:hover {
    background: rgb(from var(--color-primary-500) r g b / 0.10) !important;
}

.av-tailux-table .mud-table-body .mud-table-row.av-tailux-row--selected::after {
    content: "";
    pointer-events: none;
    position: absolute;
    /* bottom: 1px keeps the cell's gray-200 bottom-border visible — the
       inter-row divider must stay readable when several rows are selected
       in a row, otherwise the block looks like one continuous tint. */
    inset: 0 0 1px 0;
    z-index: 2;
    box-sizing: border-box;
    border: 3px solid transparent;
    border-left-color: var(--color-primary-600);
}

html.dark .av-tailux-table .mud-table-body .mud-table-row.av-tailux-row--selected {
    background: rgb(from var(--color-primary-400) r g b / 0.12) !important;
}

html.dark .av-tailux-table .mud-table-body .mud-table-row.av-tailux-row--selected:hover {
    background: rgb(from var(--color-primary-400) r g b / 0.18) !important;
}

html.dark .av-tailux-table .mud-table-body .mud-table-row.av-tailux-row--selected::after {
    border-left-color: var(--color-primary-400);
}

.av-tailux-table .mud-table-body .mud-table-cell {
    color: var(--color-gray-800) !important;
    font-size: var(--text-sm) !important;
    padding: 12px 16px;
    /* gray-200 (NOT gray-100) so the inter-row divider stays perceptible
       when the row is tinted by av-tailux-row--selected (primary-500/6%).
       gray-100 was washing out against the tint and the row read as one
       continuous block. Matches Tailux's `border-b-gray-200` on the <tr>. */
    border-bottom: 1px solid var(--color-gray-200) !important;
 transition: background-color 120ms ease;
}

.av-tailux-table .mud-table-body .mud-table-cell {
 color: var(--color-gray-800) !important;
 font-size: var(--text-sm) !important;
 padding: 12px 16px;
 border-bottom: 1px solid var(--color-gray-100) !important;
}

/* When MudTable Dense="true", Mud applies .mud-table-dense to the table.
 Tighten cell padding so the dense toggle in the View menu actually visualises. */
.av-tailux-table.mud-table-dense .mud-table-body .mud-table-cell,
.av-tailux-table.mud-table-dense .mud-table-head .mud-table-cell {
 padding: 6px 12px !important;
}

/* Bordered + Striped toggles (View menu) — para consumidores de av-tailux-table
 que expongan los params Bordered/Striped (ej. Borrowers). Mud pinta las celdas
 con bg surface opaco, así que el striped va sobre las celdas (> .mud-table-cell)
 de las filas impares; bordered pinta border-right entre celdas. Solo aplican
 cuando .mud-table-bordered / .mud-table-striped están presentes. */
.av-tailux-table.mud-table-bordered .mud-table-container .mud-table-root .mud-table-body .mud-table-row .mud-table-cell:not(:last-child) {
 border-right: 1px solid var(--color-gray-200);
}
html.dark .av-tailux-table.mud-table-bordered .mud-table-container .mud-table-root .mud-table-body .mud-table-row .mud-table-cell:not(:last-child) {
 border-right-color: var(--color-dark-600);
}

.av-tailux-table.mud-table-striped .mud-table-container .mud-table-root .mud-table-body .mud-table-row:nth-of-type(odd) > .mud-table-cell {
 background-color: var(--color-gray-100);
}
html.dark .av-tailux-table.mud-table-striped .mud-table-container .mud-table-root .mud-table-body .mud-table-row:nth-of-type(odd) > .mud-table-cell {
 background-color: var(--color-dark-800);
}

/* Narrow column used for the Status switch — width follows content (1px collapses
 to the switch's intrinsic size) and the right padding tightens so the next
 column (Name) sits visually close to the toggle. */
.av-tailux-table .av-col-status {
 width: 1px;
 white-space: nowrap;
 padding-right: 4px !important;
 padding-left: 16px !important;
}

.av-tailux-table.mud-table-dense .av-col-status {
 padding-right: 4px !important;
 padding-left: 12px !important;
}

html.dark .av-tailux-table .mud-table-body .mud-table-cell {
    color: var(--color-dark-100) !important;
    /* Matches Tailux `dark:border-b-dark-500`; dark-600 was too close to the
       row's selected-state tint and the divider disappeared. */
    border-bottom-color: var(--color-dark-500) !important;
 color: var(--color-dark-100) !important;
 border-bottom-color: var(--color-dark-600) !important;
}

/* Last row — no bottom border, otherwise it doubles up with the pager strip
 and reads as a stray gray line floating above the pagination. */
.av-tailux-table .mud-table-body .mud-table-row:last-child .mud-table-cell {
 border-bottom: 0 !important;
}

/* MudCheckBox inside cells — let Mud render it natively (its own svg + ripple).
 No overrides on .mud-checkbox / .mud-icon-button so the checkbox box stays
 visible. The earlier overrides accidentally hid the box pseudo-element. */

.av-tailux-table .mud-table-body .mud-table-row:hover {
 background: var(--color-gray-50) !important;
}

html.dark .av-tailux-table .mud-table-body .mud-table-row:hover {
 background: var(--color-dark-700) !important;
}

/* Selected-row indicator — replicates the Guía Visual ProductsTable pattern:
 an absolutely-positioned ::after overlay tinted with primary/10 and a 3px
 left border in primary-500. Requires the row to be positioned. */
.av-tailux-table .mud-table-body .mud-table-row {
 position: relative;
}

.av-tailux-table .mud-table-body .mud-table-row.av-row--selected::after {
 content: "";
 pointer-events: none;
 position: absolute;
 inset: 0;
 z-index: 2;
 border-left: 3px solid var(--color-primary-500);
 background: rgb(from var(--color-primary-500) r g b / 0.10);
}

html.dark .av-tailux-table .mud-table-body .mud-table-row.av-row--selected::after {
 border-left-color: var(--color-primary-400);
 background: rgb(from var(--color-primary-400) r g b / 0.14);
}

/* The cell content must stay above the overlay so checkboxes / text remain
 clickable and visible through the tint. */
.av-tailux-table .mud-table-body .mud-table-row.av-row--selected > .mud-table-cell {
 position: relative;
 z-index: 3;
 background: transparent !important;
}

/* Row-level action group: a horizontal cluster of MudIconButton at the end
 of a row. Tight spacing so the actions read as a single unit per row. */
.av-row-actions {
 display: inline-flex;
 align-items: center;
 gap: 4px;
 justify-content: flex-end;
}

/* Width / alignment utilities for table header + cell sizing. Replace
   `Style="width: ...; text-align: ..."` inline attributes which violate the
   "no inline Style=" rule and aren't reusable. */
.av-col-checkbox  { width: 56px; }
.av-col-actions   { width: 180px; text-align: right; }
.av-cell-actions  { text-align: right; }
 `Style="width: ...; text-align: ..."` inline attributes which violate the
 "no inline Style=" rule and aren't reusable. */
.av-col-checkbox { width: 56px; }
.av-col-actions { width: 120px; text-align: right; }
.av-cell-actions { text-align: right; }

/* ============================================================================
   .av-bulk-toolbar — floating dark pill at the bottom-right of the viewport,
   visible whenever one or more rows are selected in a table. Mirrors the
   Tailux courses-datatable bulk-action panel: count + Delete (Color.Error) +
   secondary actions (Export, Deselect). The fixed positioning keeps it in
   view as the user scrolls through the table.
   ============================================================================ */
.av-bulk-toolbar.mud-paper {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1200;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 12px 8px 20px;
    background: var(--color-gray-900);
    color: var(--color-white);
    border: 1px solid var(--color-gray-800);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px -8px rgb(0 0 0 / 0.35),
                0 4px 12px -4px rgb(0 0 0 / 0.20);
    min-width: 320px;
    max-width: calc(100vw - 48px);
}

html.dark .av-bulk-toolbar.mud-paper {
    background: var(--color-dark-800);
    border-color: var(--color-dark-700);
}

.av-bulk-toolbar__count.mud-typography {
    color: var(--color-white);
    font-weight: 500;
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
}

html.dark .av-bulk-toolbar__count.mud-typography {
    color: var(--color-dark-50);
}

.av-bulk-toolbar__actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Override the av-table-card__btn-secondary lightness so it reads on the
   dark toolbar bg — white pill with dark text. Variant for the secondary
   actions (Export, More, etc.) inside the toolbar. */
.av-bulk-toolbar .av-table-card__btn-secondary.mud-button-root:not(.mud-icon-button):not(.mud-fab) {
    background: var(--color-white) !important;
    color: var(--color-gray-900) !important;
    border-color: var(--color-white) !important;
}

.av-bulk-toolbar .av-table-card__btn-secondary.mud-button-root:not(.mud-icon-button):not(.mud-fab):hover {
    background: var(--color-gray-100) !important;
    color: var(--color-gray-900) !important;
}

/* Primary destructive action (Delete, Filled + Error). MudBlazor's default
   .mud-button-label is uppercase; restore sentence case + zero tracking so it
   matches the canonical button typography (Typo.button: text-transform: none). */
.av-bulk-toolbar .mud-button-root.mud-button-filled.mud-button-filled-error .mud-button-label {
    text-transform: none;
    letter-spacing: 0;
}

/* Trailing close button to the right of the actions — white icon, no bg. */
.av-bulk-toolbar .mud-icon-button {
    color: var(--color-white) !important;
}

.av-bulk-toolbar .mud-icon-button:hover {
    background: rgb(from var(--color-white) r g b / 0.10) !important;
}

/* Slide-up entrance animation when the bulk toolbar appears. */
.av-bulk-toolbar.mud-paper {
    animation: av-bulk-toolbar-in 180ms ease-out;
}

@keyframes av-bulk-toolbar-in {
    from { transform: translateY(12px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* Pagination footer that sits at the bottom of the .av-table-card. */
.av-table-card__pagination {
    padding: 12px 16px;
}

/* Primary cell: avatar + name + subtitle (NameCell-like) */
.av-tailux-cell {
 display: flex;
 align-items: center;
 gap: 12px;
 min-width: 0;
}

.av-tailux-cell__avatar {
 width: 36px;
 height: 36px;
 border-radius: var(--radius-md);
 display: inline-flex;
 align-items: center;
 justify-content: center;
 background: rgb(from var(--color-primary-600) r g b / 0.10);
 color: var(--color-primary-600);
 flex-shrink: 0;
}

.av-tailux-cell__avatar .mud-icon-root {
 width: 18px;
 height: 18px;
}

html.dark .av-tailux-cell__avatar {
 background: rgb(from var(--color-primary-400) r g b / 0.16);
 color: var(--color-primary-300);
}

.av-tailux-cell__text {
 display: flex;
 flex-direction: column;
 min-width: 0;
}

.av-tailux-cell__name.mud-typography {
 color: var(--color-gray-900);
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}

html.dark .av-tailux-cell__name.mud-typography {
 color: var(--color-dark-50);
}

.av-tailux-cell__sub.mud-typography {
 color: var(--color-gray-500);
}

html.dark .av-tailux-cell__sub.mud-typography {
 color: var(--color-dark-300);
}

/* Pager — Guía Visual-style. The PagerContent slot now hosts a MudPagination + info
 text (see EditTenant.razor) so we can paint numbered page controls inside a
 single rounded gray pill, exactly like the Guía Visual .pagination pattern. The
 MudTablePager fallback styling below is kept for any non-customized table. */
.av-tailux-table .mud-table-pagination,
.av-tailux-table .mud-table-pagination-toolbar {
 background: transparent;
 border: 0 !important;
 padding: 12px 20px !important;
 min-height: 56px !important;
}

/* Cuando el PagerContent usa el componente <Pagination> (.av-pagination), el
 wrapper .mud-table-pagination NO debe agregar su padding/min-height (pensados
 para el MudTablePager nativo) — si no, el espacio vertical se duplica. El
 .av-pagination ya aporta su propio padding + border-top. */
.av-tailux-table .mud-table-pagination:has(.av-pagination),
.av-tailux-table .mud-table-pagination-toolbar:has(.av-pagination) {
 padding: 0 !important;
 min-height: 0 !important;
}

/* — Guía Visual-style numbered pager (.av-tailux-pager-row) — — — — — — — — — — */

.av-tailux-pager-row {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 12px;
 padding: 12px 20px;
 flex-wrap: wrap;
}

.av-tailux-pager-row__info.mud-typography {
 color: var(--color-gray-600);
 flex-shrink: 0;
}

html.dark .av-tailux-pager-row__info.mud-typography {
 color: var(--color-dark-300);
}

/* The MudPagination group — single gray pill with transparent items inside */
.av-tailux-pagination .mud-pagination {
 display: inline-flex;
 align-items: center;
 gap: 2px;
 padding: 3px;
 background: var(--color-gray-100);
 border-radius: 12px;
}

html.dark .av-tailux-pagination .mud-pagination {
 background: var(--color-dark-800);
}

/* Each MudPagination item is internally a MudButton with its own .mud-button
 wrapper, .mud-button-label inner, ::before ripple layer, and Mud's default
 outlined/standard styling. We force all of them flat — single solid color,
 no halo, no ripple, no internal border — so the active pill reads as one
 uniform morado square instead of "two tones". */
.av-tailux-pagination .mud-pagination-item,
.av-tailux-pagination .mud-pagination-item.mud-button-root,
.av-tailux-pagination .mud-pagination-item .mud-button-root {
 min-width: 30px !important;
 width: 30px !important;
 height: 30px !important;
 margin: 0 !important;
 padding: 0 !important;
 border: 0 !important;
 outline: 0 !important;
 border-radius: 8px !important;
 background: transparent !important;
 color: var(--color-gray-700) !important;
 font-weight: 500 !important;
 box-shadow: none !important;
 transition: background-color 150ms ease, color 150ms ease;
}

/* Kill the ripple / focus-halo pseudo-elements that draw a second tone on
 top of the item background. */
.av-tailux-pagination .mud-pagination-item::before,
.av-tailux-pagination .mud-pagination-item::after,
.av-tailux-pagination .mud-pagination-item .mud-ripple,
.av-tailux-pagination .mud-pagination-item .mud-ripple-visual,
.av-tailux-pagination .mud-pagination-item .mud-ripple-container {
 display: none !important;
 background: transparent !important;
}

.av-tailux-pagination .mud-pagination-item:hover:not(.mud-pagination-item-selected):not(.mud-pagination-disabled) {
 background: var(--color-white) !important;
 color: var(--color-primary-600) !important;
}

.av-tailux-pagination .mud-pagination-item.mud-pagination-item-selected,
.av-tailux-pagination .mud-pagination-item.mud-pagination-item-selected:hover,
.av-tailux-pagination .mud-pagination-item.mud-pagination-item-selected:focus {
 background: var(--color-primary-600) !important;
 color: var(--color-white) !important;
 box-shadow: none !important;
}

.av-tailux-pagination .mud-pagination-item.mud-pagination-item-selected .mud-button-label {
 color: var(--color-white) !important;
}

.av-tailux-pagination .mud-pagination-item.mud-pagination-disabled {
 opacity: 0.35 !important;
 pointer-events: none;
}

/* Prev/Next chevron icons inside MudPagination items */
.av-tailux-pagination .mud-pagination-item .mud-icon-root {
 width: 16px;
 height: 16px;
}

/* Dots (…) — render as a plain gray spacer */
.av-tailux-pagination .mud-pagination-item.mud-pagination-dots {
 background: transparent !important;
 color: var(--color-gray-500) !important;
 cursor: default;
 box-shadow: none !important;
}

html.dark .av-tailux-pagination .mud-pagination-item {
 color: var(--color-dark-200) !important;
}

html.dark .av-tailux-pagination .mud-pagination-item:hover:not(.mud-pagination-item-selected):not(.mud-pagination-disabled) {
 background: var(--color-dark-600) !important;
 color: var(--color-primary-300) !important;
 box-shadow: 0 1px 2px rgb(0 0 0 / 0.30);
}

html.dark .av-tailux-pagination .mud-pagination-item.mud-pagination-item-selected {
 background: var(--color-primary-500) !important;
 color: var(--color-white) !important;
}

html.dark .av-tailux-pagination .mud-pagination-item.mud-pagination-dots {
 color: var(--color-dark-300) !important;
}

@media (max-width: 640px) {
 .av-tailux-pager-row {
 flex-direction: column-reverse;
 align-items: stretch;
 }
 .av-tailux-pager-row__info {
 text-align: center;
 }
 .av-tailux-pagination {
 display: flex;
 justify-content: center;
 }
}

/* Caption + "Rows per page" + rows-per-page selector */
.av-tailux-table .mud-table-pagination-information,
.av-tailux-table .mud-table-pagination-caption,
.av-tailux-table .mud-table-pagination-spacer + .mud-table-pagination-caption,
.av-tailux-table .mud-table-pagination .mud-typography {
 color: var(--color-gray-600) !important;
 font-size: var(--text-xs-plus) !important;
 font-weight: 400 !important;
}

html.dark .av-tailux-table .mud-table-pagination-information,
html.dark .av-tailux-table .mud-table-pagination-caption,
html.dark .av-tailux-table .mud-table-pagination-spacer + .mud-table-pagination-caption,
html.dark .av-tailux-table .mud-table-pagination .mud-typography {
 color: var(--color-dark-200) !important;
}

/* Rows-per-page selector — outlined chip */
.av-tailux-table .mud-table-pagination-select.mud-select {
 margin: 0 12px !important;
}

.av-tailux-table .mud-table-pagination-select.mud-select .mud-input-control {
 background: var(--color-gray-50);
 border-radius: 8px;
 padding: 0 8px;
}

html.dark .av-tailux-table .mud-table-pagination-select.mud-select .mud-input-control {
 background: var(--color-dark-800);
}

/* Action button group — grouped pill, .pagination from Guía Visual */
.av-tailux-table .mud-table-pagination-actions {
 display: inline-flex;
 align-items: center;
 gap: 2px;
 padding: 3px;
 background: var(--color-gray-100);
 border-radius: 9999px;
}

html.dark .av-tailux-table .mud-table-pagination-actions {
 background: var(--color-dark-800);
}

.av-tailux-table .mud-table-pagination-actions .mud-icon-button {
 border-radius: 9999px !important;
 width: 30px !important;
 height: 30px !important;
 padding: 6px !important;
 color: var(--color-gray-700) !important;
 background: transparent !important;
 transition: background-color 150ms ease, color 150ms ease;
}

.av-tailux-table .mud-table-pagination-actions .mud-icon-button:hover:not(.mud-disabled) {
 background: var(--color-white) !important;
 color: var(--color-primary-600) !important;
 box-shadow: 0 1px 2px rgb(from var(--color-gray-900) r g b / 0.06);
}

.av-tailux-table .mud-table-pagination-actions .mud-icon-button.mud-disabled,
.av-tailux-table .mud-table-pagination-actions .mud-icon-button:disabled {
 opacity: 0.35 !important;
 pointer-events: none;
}

.av-tailux-table .mud-table-pagination-actions .mud-icon-button .mud-icon-root {
 width: 18px;
 height: 18px;
}

html.dark .av-tailux-table .mud-table-pagination-actions .mud-icon-button {
 color: var(--color-dark-200) !important;
}

html.dark .av-tailux-table .mud-table-pagination-actions .mud-icon-button:hover:not(.mud-disabled) {
 background: var(--color-dark-600) !important;
 color: var(--color-primary-300) !important;
 box-shadow: 0 1px 2px rgb(0 0 0 / 0.30);
}

/* ============================================================================
 Page header + filter pills (Guía Visual users-datatable parity)

 Layout pattern for list pages with table:
 - .av-page-header → row with title (left) + primary actions (right)
 - .av-page-filters → row with filter pills (left) + search (right)
 - .av-filter-pill → individual clickable filter chip with count

 The header sits ABOVE the av-table-card; the filters sit between header and
 table card. Both are page-level wrappers, not inside the card.
 ============================================================================ */

.av-page-header {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 16px;
 padding: 16px 0 12px;
 flex-wrap: wrap;
}

.av-page-header__title {
 display: flex;
 flex-direction: column;
 gap: 2px;
 min-width: 0;
}

.av-page-header__title-text.mud-typography {
 color: var(--color-gray-900);
}

html.dark .av-page-header__title-text.mud-typography {
 color: var(--color-dark-50);
}

.av-page-header__title-hint.mud-typography {
 color: var(--color-gray-500);
}

html.dark .av-page-header__title-hint.mud-typography {
 color: var(--color-dark-300);
}

.av-page-header__actions {
 display: flex;
 align-items: center;
 gap: 8px;
 flex-wrap: wrap;
}

.av-page-filters {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 16px;
 padding: 4px 0 16px;
}

.av-filter-pills {
 display: flex;
 align-items: center;
 gap: 8px;
 flex: 1 1 auto;
 min-width: 0;
 overflow-x: auto;
 scrollbar-width: none;
}

.av-filter-pills::-webkit-scrollbar {
 display: none;
}

.av-page-filters__tools {
 display: flex;
 align-items: center;
 gap: 8px;
 flex-shrink: 0;
}

/* Page-level footer — pair to av-page-header. Holds primary actions that sit
 BELOW the table card (e.g. Next button in wizard flows). Aligned right by
 default; pass utility classes (justify-start, etc.) to override. */
.av-page-footer {
 display: flex;
 align-items: center;
 justify-content: flex-end;
 gap: 8px;
 padding: 16px 0 8px;
}

.av-filter-pill {
 display: inline-flex;
 align-items: center;
 gap: 8px;
 padding: 6px 12px;
 background: transparent;
 border: 1px solid var(--color-gray-200);
 border-radius: 9999px;
 cursor: pointer;
 transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
 color: var(--color-gray-700);
 white-space: nowrap;
}

.av-filter-pill:hover {
 background: var(--color-gray-100);
 border-color: var(--color-gray-300);
}

.av-filter-pill--active {
 background: rgb(from var(--color-primary-500) r g b / 0.10);
 border-color: var(--color-primary-500);
 color: var(--color-primary-700);
}

.av-filter-pill--active:hover {
 background: rgb(from var(--color-primary-500) r g b / 0.14);
}

.av-filter-pill__label.mud-typography {
 color: inherit;
 font-weight: 500;
}

.av-filter-pill__count.mud-typography {
 padding: 2px 8px;
 border-radius: 9999px;
 background: var(--color-gray-100);
 color: var(--color-gray-600);
 font-weight: 600;
 line-height: 1.2;
}

.av-filter-pill--active .av-filter-pill__count.mud-typography {
 background: var(--color-primary-500);
 color: var(--color-white);
}

html.dark .av-filter-pill {
 border-color: var(--color-dark-500);
 color: var(--color-dark-200);
}

html.dark .av-filter-pill:hover {
 background: var(--color-dark-700);
 border-color: var(--color-dark-400);
}

html.dark .av-filter-pill--active {
 background: rgb(from var(--color-primary-400) r g b / 0.16);
 border-color: var(--color-primary-400);
 color: var(--color-primary-200);
}

html.dark .av-filter-pill__count.mud-typography {
 background: var(--color-dark-600);
 color: var(--color-dark-200);
}

html.dark .av-filter-pill--active .av-filter-pill__count.mud-typography {
 background: var(--color-primary-400);
 color: var(--color-dark-900);
}

.av-page-filters__search {
 flex: 0 1 280px;
 min-width: 200px;
}

/* Match the input height to the toolbar button height (32px) so search + View
 read as a single horizontally-aligned row. Mud's default Dense Outlined input
 sits at ~40px, which towers over the buttons; this override aligns them. */
.av-page-filters__search .mud-input-control {
 height: 32px;
 min-height: 32px;
}

.av-page-filters__search .mud-input-control .mud-input,
.av-page-filters__search .mud-input-control .mud-input-slot {
 min-height: 32px;
 height: 32px;
}

.av-page-filters__search .mud-input-control .mud-input-slot input {
 font-size: var(--text-xs);
 padding-top: 0;
 padding-bottom: 0;
}

.av-page-filters__search .mud-input-control .mud-input-outlined-border {
 border-radius: var(--radius-md);
}

.av-page-filters__search .mud-input-control .mud-input-adornment-start {
 margin-top: 0;
}

.av-page-filters__search .mud-input-control .mud-input-adornment .mud-icon-root {
 width: 16px;
 height: 16px;
 font-size: 16px;
}

/* ============================================================================
   .av-page-filters__left / .av-page-filters__right
   Grouping wrappers used to lay out the toolbar Tailux-style:
       [Search] [FilterBtn …]            (left group)
       [ViewBtn]                          (right group)
   Both groups share the 8 px gap rhythm. The parent .av-page-filters keeps
   its space-between behaviour so left/right collapse to opposite ends.
   ============================================================================ */
.av-page-filters__left,
.av-page-filters__right {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.av-page-filters__left {
    flex: 1 1 auto;
}

.av-page-filters__right {
    flex-shrink: 0;
}

/* ============================================================================
   .av-table-filter-btn — Tailux faceted filter button (h-8 / px-2.5 / text-xs)
   Compact DASHED-bordered button. Inside: icon + label + optional vertical
   divider + gray badge when a value is picked (or a count for the selector).
   Every chip + the FilterSelector share this single style — the only thing
   that changes when a filter is applied is the presence of the divider+badge.
   ============================================================================ */
.av-table-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 10px;
    background: transparent;
    border: 1px dashed var(--color-gray-300);
    border-radius: var(--radius-md);
    color: var(--color-gray-900);
    font-size: var(--text-xs);
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 150ms ease;
}

.av-table-filter-btn:hover,
.av-table-filter-btn:focus {
    background: rgb(from var(--color-gray-300) r g b / 0.20);
    outline: none;
}

.av-table-filter-btn:active {
    background: rgb(from var(--color-gray-300) r g b / 0.25);
}

.av-table-filter-btn__icon.mud-icon-root {
    width: 16px;
    height: 16px;
    font-size: 16px;
    color: inherit;
}

.av-table-filter-btn__divider {
    width: 1px;
    align-self: stretch;
    background: var(--color-gray-300);
    margin: 4px 0;
}

.av-table-filter-btn__badge {
    display: inline-flex;
    align-items: center;
    height: 18px;
    padding: 0 6px;
    border-radius: var(--radius-sm);
    background: var(--color-gray-200);
    color: var(--color-gray-900);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

html.dark .av-table-filter-btn {
    border-color: var(--color-dark-450);
    color: var(--color-dark-50);
}

html.dark .av-table-filter-btn:hover,
html.dark .av-table-filter-btn:focus {
    background: rgb(from var(--color-dark-300) r g b / 0.20);
}

html.dark .av-table-filter-btn:active {
    background: rgb(from var(--color-dark-300) r g b / 0.25);
}

html.dark .av-table-filter-btn__divider {
    background: var(--color-dark-450);
}

html.dark .av-table-filter-btn__badge {
    background: var(--surface-2);
    color: var(--color-dark-50);
}

/* ============================================================================
   .av-filter-popover — popover content used by MudMenu when a filter button
   is clicked. Holds a list of options + an optional "Clear filter" footer.
   ============================================================================ */
.av-filter-popover.mud-popover {
    border-radius: var(--radius-md);
    border: 1px solid var(--color-gray-300);
    box-shadow: 0 10px 15px -3px rgb(from var(--color-gray-200) r g b / 0.50),
                0 4px 6px -4px rgb(from var(--color-gray-200) r g b / 0.50);
    min-width: 224px;
    width: fit-content;
    overflow: hidden;
    background: var(--color-white);
}

html.dark .av-filter-popover.mud-popover {
    background: var(--color-dark-750, var(--color-dark-700));
    border-color: var(--color-dark-500);
    box-shadow: none;
}

/* Zero padding on the list so the search header (gray-100 bg) reaches the
   popover's TOP edge and the footer button reaches the BOTTOM edge. The
   popover's `overflow: hidden` + `border-radius: --radius-md` clip the
   corners cleanly — search corners get the top radius, footer button gets
   the bottom radius. Items between get their own padding for breath. */
.av-filter-popover .mud-list {
    padding: 0;
}

.av-filter-popover__item.mud-list-item,
.av-filter-popover__item.mud-menu-item {
    padding: 8px 10px !important;
    margin: 0 !important;
    min-height: auto !important;
    border-radius: 0 !important;
    background-color: transparent !important;
}

/* Tighten the label's line-height so the row isn't dragged taller by Mud's
   default 1.43em on body2 (~20 px for the 13 px label = wasted vertical
   space when an item carries a single line). */
.av-filter-popover__item .av-filter-popover__item-name.mud-typography {
    line-height: 1.3 !important;
}

.av-filter-popover__item.mud-list-item:hover,
.av-filter-popover__item.mud-menu-item:hover {
    background-color: var(--color-gray-100) !important;
}

html.dark .av-filter-popover__item.mud-list-item:hover,
html.dark .av-filter-popover__item.mud-menu-item:hover {
    background-color: var(--color-dark-600) !important;
}

.av-filter-popover__item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}

.av-filter-popover__item-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}

.av-filter-popover__item-name.mud-typography {
    font-size: var(--text-xs-plus);
    color: var(--color-gray-800);
}

html.dark .av-filter-popover__item-name.mud-typography {
    color: var(--color-dark-100);
}

.av-filter-popover__item-count.mud-typography {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--color-gray-500);
}

html.dark .av-filter-popover__item-count.mud-typography {
    color: var(--color-dark-300);
}

.av-filter-popover__item--selected.mud-list-item,
.av-filter-popover__item--selected.mud-menu-item {
    background-color: rgb(from var(--color-primary-500) r g b / 0.10) !important;
}

.av-filter-popover__item--selected .av-filter-popover__item-name.mud-typography {
    color: var(--color-primary-700);
    font-weight: 600;
}

html.dark .av-filter-popover__item--selected.mud-list-item,
html.dark .av-filter-popover__item--selected.mud-menu-item {
    background-color: rgb(from var(--color-primary-400) r g b / 0.20) !important;
}

html.dark .av-filter-popover__item--selected .av-filter-popover__item-name.mud-typography {
    color: var(--color-primary-200);
}

/* Radio-button visual marker for filter-popover rows. Matches the canonical
   `.mud-radio:has(input:checked)` skin defined above at §checkbox/radio:
   idle = hairline ring on transparent, selected = solid primary fill with a
   6 × 6 white inner dot. Same metrics so the popover reads as part of the
   same form vocabulary as the form-level radios. */
.av-filter-popover__radio-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgb(from var(--color-gray-400) r g b / 0.7);
    background: transparent;
    flex-shrink: 0;
    position: relative;
    transition: border-color 150ms ease, background-color 150ms ease;
}

.av-filter-popover__item--selected .av-filter-popover__radio-dot {
    border-color: var(--color-primary-600);
    background-color: var(--color-primary-600);
}

.av-filter-popover__item--selected .av-filter-popover__radio-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background-color: var(--color-white);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

html.dark .av-filter-popover__radio-dot {
    border-color: var(--color-dark-400);
}

html.dark .av-filter-popover__item--selected .av-filter-popover__radio-dot {
    border-color: var(--color-primary-400);
    background-color: var(--color-primary-400);
}

/* ----------------------------------------------------------------------------
   av-filter-popover__group / __radio — MudRadioGroup + MudRadio integration
   for filter chip popovers. The group renders nothing visible (no MudInput
   chrome around the items list), and the inner radio is non-interactive so
   the MudMenuItem's OnClick is the single source of state change (otherwise
   the group's ValueChanged would fire too and double-trigger the filter).
   The radio is purely a visual indicator that reads `FilterCategory` /
   `FilterDateRange` via the group's one-way binding. */
.av-filter-popover__group.mud-input-control {
    margin: 0 !important;
    padding: 0 !important;
}

.av-filter-popover__group .mud-input-control-input-container {
    padding: 0 !important;
    margin: 0 !important;
}

.av-filter-popover__group .mud-input-helper-text {
    display: none !important;
}

/* The radio sits where the deprecated `__radio-dot` span used to — no extra
   margin, the same flex slot. Mud paints `.mud-radio` with its own padding
   for ripple area; collapse it so the popover row stays compact. */
.av-filter-popover__radio.mud-radio {
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0;
    /* MudMenuItem captures the click → calls OnXFilterClick → updates the
       bound FilterX → group re-renders → this radio shows the new checked
       state. Without `pointer-events: none` the radio would also fire the
       group's ValueChanged on its own click and we'd double-call the
       handler. */
    pointer-events: none;
}

/* Footer wrapper — the Clear Filter button is flush with the popover edges
   (rounded-none, no inset padding). The button's own background acts as the
   visual separator from the items list above; no border-top needed. */
.av-filter-popover__footer {
    display: flex;
    padding: 0;
}

/* The `:not(.mud-icon-button):not(.mud-fab)` chain echoes mud-bridge.css §LAST-2
   which globally forces `border-radius: var(--radius-lg)` on every MudButton.
   Without matching those :not()s here, that global rule wins by specificity
   and the Clear Filter button gets rounded top corners — which we don't want
   inside a popover footer that must be flush with the panel edges. */
.av-filter-popover__clear.mud-button-root:not(.mud-icon-button):not(.mud-fab) {
    width: 100%;
    height: 36px;
    padding: 0 12px;
    text-transform: none;
    letter-spacing: 0;
    font-family: var(--font-sans);
    font-size: var(--text-xs-plus);
    font-weight: 500;
    color: var(--color-gray-900);
    background: rgb(from var(--color-gray-200) r g b / 0.70);
    border: 0;
    border-radius: 0 !important;
    box-shadow: none;
}

.av-filter-popover__clear.mud-button-root:not(.mud-icon-button):not(.mud-fab):hover,
.av-filter-popover__clear.mud-button-root:not(.mud-icon-button):not(.mud-fab):focus {
    background: var(--color-gray-200);
    color: var(--color-gray-900);
}

.av-filter-popover__clear.mud-button-root:not(.mud-icon-button):not(.mud-fab):active {
    background: rgb(from var(--color-gray-200) r g b / 0.80);
}

html.dark .av-filter-popover__clear.mud-button-root:not(.mud-icon-button):not(.mud-fab) {
    color: var(--color-dark-50);
    background: var(--surface-2);
}

html.dark .av-filter-popover__clear.mud-button-root:not(.mud-icon-button):not(.mud-fab):hover,
html.dark .av-filter-popover__clear.mud-button-root:not(.mud-icon-button):not(.mud-fab):focus {
    background: var(--surface-1);
}

html.dark .av-filter-popover__clear.mud-button-root:not(.mud-icon-button):not(.mud-fab):active {
    background: rgb(from var(--surface-1) r g b / 0.90);
}

/* ============================================================================
   FilterSelector popover — search input header (mirrors Tailux Combobox).
   The FilterSelector button itself reuses the base .av-table-filter-btn
   style (no special variant) so visually it sits in the same row as the
   other chips; only its badge content differs (a count, not a value label).
   ============================================================================ */

/* Search header — the entire strip carries a soft gray-100 background; the
   bg itself acts as the visual separator from the items list below (no
   border-bottom). Matches Tailux Combobox: `bg-gray-100 py-1` container with
   a borderless input floating inside. */
.av-filter-popover__search {
    padding: 1px 6px;
    margin-bottom: 3px;
    background: var(--color-gray-100);
    border-bottom: 0;
}

html.dark .av-filter-popover__search {
    background: var(--color-dark-900);
    border-bottom: 0;
}

/* Compact height (32 px), matches the chip family rhythm. */
.av-filter-popover__search .mud-input-control {
    height: 32px;
    min-height: 32px;
}

.av-filter-popover__search .mud-input-control .mud-input,
.av-filter-popover__search .mud-input-control .mud-input-slot {
    min-height: 32px;
    height: 32px;
}

.av-filter-popover__search .mud-input-control .mud-input-slot input {
    font-size: var(--text-xs-plus);
    padding-top: 0;
    padding-bottom: 0;
}

/* Kill the outlined fieldset entirely. The Mud bridge (§LAST-3) repaints the
   border on every state of `.mud-input-outlined-border`; instead of fighting
   it with `border-color: transparent`, we remove the fieldset from the render
   tree. The fieldset is a sibling of the actual <input>, so display:none
   doesn't affect the input's layout. */
.av-filter-popover__search .mud-input-outlined-border,
.av-filter-popover__search .mud-input.mud-input-outlined .mud-input-outlined-border {
    display: none !important;
}

.av-filter-popover__search .mud-input-control .mud-input-adornment-start {
    margin-top: 0;
}

/* Magnifying glass + placeholder both render gray at rest and switch to the
   active brand primary only when the input is focused. Matches the Tailux
   Combobox: `text-gray-400 peer-focus:text-primary-600`. */
.av-filter-popover .av-filter-popover__search .mud-input-control .mud-input-adornment .mud-icon-root,
.av-filter-popover__search .mud-input.mud-input-outlined .mud-input-adornment .mud-icon-root {
    width: 16px !important;
    height: 16px !important;
    font-size: 16px !important;
    color: var(--color-gray-400) !important;
    transition: color 150ms ease;
}

.av-filter-popover .av-filter-popover__search .mud-input-control .mud-input-slot input::placeholder,
.av-filter-popover__search .mud-input.mud-input-outlined .mud-input-slot input::placeholder {
    color: var(--color-gray-400) !important;
    opacity: 1;
}

/* Focus state — both icon and (placeholder remains because text is gray
   while typing). The icon turns primary to signal the active input. */
.av-filter-popover__search .mud-input-control:focus-within .mud-input-adornment .mud-icon-root,
.av-filter-popover__search .mud-input.mud-input-outlined:focus-within .mud-input-adornment .mud-icon-root {
    color: var(--color-primary-600) !important;
}

html.dark .av-filter-popover .av-filter-popover__search .mud-input-control .mud-input-adornment .mud-icon-root,
html.dark .av-filter-popover__search .mud-input.mud-input-outlined .mud-input-adornment .mud-icon-root {
    color: var(--color-dark-300) !important;
}

html.dark .av-filter-popover .av-filter-popover__search .mud-input-control .mud-input-slot input::placeholder,
html.dark .av-filter-popover__search .mud-input.mud-input-outlined .mud-input-slot input::placeholder {
    color: var(--color-dark-300) !important;
}

html.dark .av-filter-popover__search .mud-input-control:focus-within .mud-input-adornment .mud-icon-root,
html.dark .av-filter-popover__search .mud-input.mud-input-outlined:focus-within .mud-input-adornment .mud-icon-root {
    color: var(--color-primary-500) !important;
}

/* Empty state shown when the search query filters out every available filter */
.av-filter-popover__empty {
    padding: 16px 12px;
    text-align: center;
    color: var(--color-gray-500);
}

html.dark .av-filter-popover__empty {
    color: var(--color-dark-300);
}

/* Checkbox row inside the selector popover — replaces the radio-dot pattern */
.av-filter-popover__check {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1.5px solid var(--color-gray-400);
    background: transparent;
    flex-shrink: 0;
    position: relative;
    transition: background 150ms ease, border-color 150ms ease;
}

.av-filter-popover__item--selected .av-filter-popover__check {
    background: var(--color-primary-500);
    border-color: var(--color-primary-500);
}

.av-filter-popover__item--selected .av-filter-popover__check::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid var(--color-white);
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

html.dark .av-filter-popover__check {
    border-color: var(--color-dark-400);
}

html.dark .av-filter-popover__item--selected .av-filter-popover__check {
    background: var(--color-primary-400);
    border-color: var(--color-primary-400);
}

/* FilterSelector popover items are MULTI-select (checkboxes). The checked
   state is communicated by the filled blue check itself — the row should
   NOT also gain a tinted background or bold/primary label, otherwise it
   reads like a single-select radio. Scoped with :has() so the rule fires
   only on items that carry a `.av-filter-popover__check` indicator and
   leaves the radio-dot rows (single-select chip popovers) untouched. */
.av-filter-popover__item--selected.mud-list-item:has(.av-filter-popover__check),
.av-filter-popover__item--selected.mud-menu-item:has(.av-filter-popover__check) {
    background-color: transparent !important;
}

.av-filter-popover__item--selected:has(.av-filter-popover__check) .av-filter-popover__item-name.mud-typography {
    color: var(--color-gray-800);
    font-weight: 400;
}

html.dark .av-filter-popover__item--selected:has(.av-filter-popover__check) .av-filter-popover__item-name.mud-typography {
    color: var(--color-dark-100);
}

/* Sticky filter row — locked active, not disabled. MudMenuItem with Disabled
   defaults to 0.5 opacity which would read as "unavailable"; we override to
   full opacity so the row stays prominently checked, but block interaction
   (cursor + no hover tint) so the user can't toggle it off. Paired with the
   `key == "contacts" && !enabled` guard in ToggleToolbarFilter. */
.av-filter-popover__item--sticky.mud-list-item.mud-disabled,
.av-filter-popover__item--sticky.mud-menu-item.mud-disabled {
    opacity: 1 !important;
    cursor: not-allowed !important;
    pointer-events: auto !important;
}

.av-filter-popover__item--sticky.mud-list-item.mud-disabled:hover,
.av-filter-popover__item--sticky.mud-menu-item.mud-disabled:hover {
    background-color: transparent !important;
}

/* ============================================================================
   .av-phone-input — single source of truth for the PhoneInputIntl skin.

   The component (Shared/Components/IntlTelInput/PhoneInputIntl.razor) wraps
   a MudTextField (Variant.Outlined) and lets intl-tel-input v25 inject its
   own DOM around the <input>: a clickable country selector (.iti__selected-
   country) + the actual input (.iti__tel-input), plus a portal-mounted
   dropdown (.iti--container) for the country list.

   Everything below was previously a `<style>` block inside the .razor that
   referenced --mud-palette-* runtime variables. Moving it here gives us:
   (a) compliance with the no-style-in-razor doctrine, (b) Avalme tokens that
   follow data-theme-primary / data-theme-light / data-theme-dark via the
   customizer, (c) a single place to evolve the look.

   Layout:
     1. iti CSS-variable overrides (border / hover / dropdown bg)
     2. Input area chrome reset (no double borders / focus rings)
     3. Label background pinned to the surface (no discontinuous outline)
     4. Margin variants (--dense / --normal) — match Mud's Outlined heights
     5. Dropdown popover skin (.iti--container) — matches av-filter-popover
   ============================================================================ */

/* 1) iti library CSS variables — re-bind to Avalme tokens so the dropdown's
   internal border / hover follow the active theme. The .iti--container is
   the portal element the dropdown mounts to (sibling of <body>), so we set
   the vars on both the input wrapper and the portal. */
.iti,
.iti--container {
    --iti-border-color: var(--color-gray-300);
    --iti-hover-color: rgb(from var(--color-gray-900) r g b / 0.04);
    --iti-dropdown-bg: var(--color-white);
    --iti-dialcode-color: var(--color-gray-500);
}

html.dark .iti,
html.dark .iti--container {
    --iti-border-color: var(--color-dark-450);
    --iti-hover-color: rgb(from var(--color-white) r g b / 0.06);
    --iti-dropdown-bg: var(--color-dark-700);
    --iti-dialcode-color: var(--color-dark-300);
}

/* 2) Input area chrome reset. The MudTextField outlined fieldset is the ONE
   visible border (skinned by mud-bridge §LAST-3). Every other inner element
   gets its border / outline / box-shadow nuked so we don't paint a second
   border on top, and the country selector button doesn't show a browser focus
   ring on click.
   IMPORTANT: must EXCLUDE .iti--container — that's the portaled dropdown,
   which is its OWN popover and needs its own border (set further down). */
.iti:not(.iti--container),
.iti:not(.iti--container):focus-within,
.iti__tel-input,
.iti__tel-input:focus,
.iti__tel-input:focus-visible,
.iti__tel-input:active,
.iti__tel-input:hover {
    outline: none !important;
    box-shadow: none !important;
    border: 0 !important;
}

.iti__country-container,
.iti__country-container *,
.iti__selected-country,
.iti__selected-country *,
.iti__selected-country-primary,
.iti__selected-country-primary *,
.iti__country-container::before,
.iti__country-container::after,
.iti__selected-country::before,
.iti__selected-country::after,
.iti__selected-country-primary::before,
.iti__selected-country-primary::after {
    border: 0 !important;
    box-shadow: none !important;
    outline: none !important;
}

.iti__country-container,
.iti__selected-country,
.iti__selected-country-primary {
    background: transparent !important;
}

.iti__selected-country:focus,
.iti__selected-country:focus-visible,
.iti__selected-country-primary:focus,
.iti__selected-country-primary:focus-visible,
.iti__selected-country[aria-expanded="true"],
.iti__selected-country-primary[aria-expanded="true"] {
    outline: none !important;
    box-shadow: none !important;
    border: 0 !important;
    background: transparent !important;
}

.iti__selected-country:hover,
.iti__selected-country-primary:hover {
    background: rgb(from var(--color-gray-900) r g b / 0.04) !important;
}

html.dark .iti__selected-country:hover,
html.dark .iti__selected-country-primary:hover {
    background: rgb(from var(--color-white) r g b / 0.06) !important;
}

/* Dial-code text ("+1", "+34") rendered next to the flag — same secondary
   color as field labels so it doesn't compete visually with the typed value. */
.iti__selected-dial-code {
    color: var(--color-gray-600) !important;
}

html.dark .iti__selected-dial-code {
    color: var(--color-dark-300) !important;
}

/* 3) The actual <input> takes the body's color so no inner tint leaks around
   the country selector. The placeholder follows our text-disabled token. */
.iti__tel-input {
    background: transparent !important;
    color: var(--color-gray-900) !important;
    font-size: var(--text-sm) !important;
    line-height: 1.4375 !important;
}

html.dark .iti__tel-input {
    color: var(--color-dark-50) !important;
}

.iti__tel-input::placeholder {
    color: var(--color-gray-400) !important;
    opacity: 1;
}

html.dark .iti__tel-input::placeholder {
    color: var(--color-dark-300) !important;
}

/* 4) Label is FORCED permanently into the shrunk (floating) position via a
   transform. Without this, the label sits in the natural centered position
   when the input is empty + unfocused, and the intl-tel-input country
   selector (the flag + dial code on the left) renders on top of it,
   producing the visual collapse you saw in the Tenant Contact Phone vs
   Email comparison. The background pin makes the label "cut" the border
   cleanly; --color-white / --color-dark-700 matches both .av-page-card and
   .av-form-dialog so the cut looks unbroken in either surface. Padding 0 4px
   gives the label some lateral breath inside the cut. */
.av-phone-input.mud-input-control .mud-input-label-outlined {
    transform: translate(14px, -6px) scale(0.75) !important;
    background-color: var(--color-white) !important;
    padding: 0 4px !important;
}

html.dark .av-phone-input.mud-input-control .mud-input-label-outlined {
    background-color: var(--color-dark-700) !important;
}

/* 5) Vertical padding variants — exact values pulled from MudBlazor 9.2.0
   `MudBlazor.min.css` for outlined inputs so the phone input lines up flush
   with sibling MudTextFields in the same form:
     • Dense  → `padding: 10.5px` (rule `input.mud-input-root-outlined.mud-input-root-margin-dense`)
     • Normal → `padding: 18.5px` (rule `input.mud-input-root-outlined`)
   The library does NOT respect the parent's Margin prop on the iti__tel-input
   directly, so we apply the same numbers here with !important to win against
   the vendored override at `lib/intl-tel-input/intlTelInput.css §end`. */
.av-phone-input--dense .iti__tel-input {
    padding-top: 10.5px !important;
    padding-bottom: 10.5px !important;
}

.av-phone-input--normal .iti__tel-input {
    padding-top: 18.5px !important;
    padding-bottom: 18.5px !important;
}

/* ---------------------------------------------------------------------------
   Dropdown popover (.iti--container) — the country list that opens when the
   user clicks the flag. Mounts in a portal at <body> root, so it can't be
   scoped to .av-phone-input; we style it globally.
   --------------------------------------------------------------------------- */
/* intl-tel-input v26 has two render modes for the country picker dropdown:

     • PORTALED — when JS opts in via `dropdownContainer: document.body`,
       the panel is appended at <body> root as `<div class="iti--container">
       > <div class="iti__dropdown-content">`. Positioned by the lib with
       `position: fixed` + inline top/left.

     • INLINE (the default in v26 on desktop) — the panel sits as a sibling
       of the trigger button inside `.iti__country-container`, with class
       `iti--inline-dropdown` on the outer `.iti` wrapper. Positioned by
       the lib with `position: absolute`.

   The single class present in BOTH modes is `.iti__dropdown-content` — so
   that's the anchor for every chrome rule. The `.iti--container` selector
   only matches the portaled mode and is used solely to lift z-index there.

   IMPORTANT: in inline mode the dropdown sits inside the MudTextField
   wrapper, which is overflow:hidden in places. `position: absolute` +
   high z-index on `.iti__dropdown-content` lets the panel escape the
   surrounding box and overlay the form correctly. */

.iti--container {
    z-index: 10000 !important;
}

/* The visible panel — opaque background, hairline border, rounded corners,
   shadow, internal overflow:hidden so country rows respect the radius.
   Position+z-index ensure it floats above the input cluster in inline mode
   and doesn't get clipped by the MudTextField's outlined fieldset. */
.iti__dropdown-content {
    position: absolute;
    z-index: 1500;
    background: var(--color-white) !important;
    border: 1px solid var(--color-gray-200) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: 0 8px 24px rgb(from var(--color-gray-900) r g b / 0.10) !important;
    overflow: hidden;
}

/* Portaled mode owns its position (set by JS); don't second-guess it. */
.iti--container .iti__dropdown-content {
    position: static;
}

html.dark .iti__dropdown-content {
    background: var(--color-dark-700) !important;
    border-color: var(--color-dark-500) !important;
    box-shadow: 0 8px 24px rgb(0 0 0 / 0.35) !important;
}

/* Search input at the top of the dropdown — same borderless treatment as the
   FilterSelector popover (av-filter-popover__search): no outlined frame, a
   hairline bottom divider separates the search from the country list.
   padding-left: 36px reserves space for the absolutely-positioned search
   icon (.iti__search-icon) so the placeholder text doesn't sit under it. */
.iti__dropdown-content .iti__search-input {
    background-color: var(--color-white) !important;
    color: var(--color-gray-900) !important;
    border: 0 !important;
    border-bottom: 1px solid var(--color-gray-100) !important;
    border-radius: 0 !important;
    padding: 10px 36px 10px 36px !important;
    font-size: var(--text-xs-plus) !important;
    font-family: var(--font-sans) !important;
    outline: none !important;
    box-shadow: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Search-input wrapper — make the icon position predictable */
.iti__dropdown-content .iti__search-input-wrapper {
    position: relative;
    background: var(--color-white) !important;
}

html.dark .iti__dropdown-content .iti__search-input-wrapper {
    background: var(--color-dark-700) !important;
}

/* Search icon — pin to the left edge, vertically centered */
.iti__dropdown-content .iti__search-icon {
    position: absolute !important;
    left: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    pointer-events: none;
    color: var(--color-gray-400);
    display: flex;
    align-items: center;
}

html.dark .iti__dropdown-content .iti__search-icon {
    color: var(--color-dark-300);
}

.iti__dropdown-content .iti__search-icon-svg {
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* Search clear (X) — same right-edge pinning */
.iti__dropdown-content .iti__search-clear {
    position: absolute !important;
    right: 10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: transparent !important;
    border: 0 !important;
    cursor: pointer;
    color: var(--color-gray-500);
    padding: 4px;
}

.iti__dropdown-content .iti__search-input:focus,
.iti__dropdown-content .iti__search-input:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border-bottom-color: var(--color-primary-500) !important;
}

.iti__dropdown-content .iti__search-input::placeholder {
    color: var(--color-gray-400) !important;
    opacity: 1;
}

html.dark .iti__dropdown-content .iti__search-input {
    background-color: var(--color-dark-700) !important;
    color: var(--color-dark-50) !important;
    border-bottom-color: var(--color-dark-600) !important;
}

html.dark .iti__dropdown-content .iti__search-input::placeholder {
    color: var(--color-dark-300) !important;
}

html.dark .iti__dropdown-content .iti__search-input:focus,
html.dark .iti__dropdown-content .iti__search-input:focus-visible {
    border-bottom-color: var(--color-primary-400) !important;
}

/* Country list rows — compact, hover with our subtle gray tint, primary tint
   for the highlighted (keyboard-focused) row. */
.iti__dropdown-content .iti__country-list {
    padding: 4px;
    max-height: 280px;
    background: var(--color-white) !important;
    border: 0 !important;
}

html.dark .iti__dropdown-content .iti__country-list {
    background: var(--color-dark-700) !important;
}

.iti__dropdown-content .iti__country {
    padding: 6px 10px !important;
    border-radius: var(--radius-md) !important;
    transition: background-color 150ms ease !important;
}

.iti__dropdown-content .iti__country:hover,
.iti__dropdown-content .iti__country.iti__highlight {
    background: rgb(from var(--color-gray-900) r g b / 0.04) !important;
}

html.dark .iti__dropdown-content .iti__country:hover,
html.dark .iti__dropdown-content .iti__country.iti__highlight {
    background: rgb(from var(--color-white) r g b / 0.06) !important;
}

.iti__dropdown-content .iti__country.iti__active {
    background: rgb(from var(--color-primary-500) r g b / 0.10) !important;
}

html.dark .iti__dropdown-content .iti__country.iti__active {
    background: rgb(from var(--color-primary-400) r g b / 0.18) !important;
}

/* Country row typography — name in body text, dial code in secondary tone. */
.iti__dropdown-content .iti__country-name {
    color: var(--color-gray-800) !important;
    font-family: var(--font-sans) !important;
    font-size: var(--text-xs-plus) !important;
}

html.dark .iti__dropdown-content .iti__country-name {
    color: var(--color-dark-100) !important;
}

.iti__dropdown-content .iti__dial-code {
    color: var(--color-gray-500) !important;
    font-family: var(--font-mono) !important;
    font-size: var(--text-xs) !important;
}

html.dark .iti__dropdown-content .iti__dial-code {
    color: var(--color-dark-300) !important;
}

/* Empty state ("No results found for …") inside the dropdown */
.iti__dropdown-content .iti__no-results {
    padding: 12px 14px;
    color: var(--color-gray-500) !important;
    font-size: var(--text-xs-plus) !important;
    text-align: center;
}

html.dark .iti__dropdown-content .iti__no-results {
    color: var(--color-dark-300) !important;
}

/* — Tab Services wrapper: card around the table area — — — — — — — — — — */

.av-table-card {
 background: var(--color-white);
 border: 1px solid var(--color-gray-200);
 border-radius: var(--radius-xl);
 overflow: hidden;
 display: flex;
 flex-direction: column;
}

html.dark .av-table-card {
 background: var(--color-dark-700);
 border-color: var(--color-dark-500);
}

/* Toolbar above the table — title left, search right */
.av-table-card__toolbar {
 display: flex;
 align-items: center;
 gap: 16px;
 padding: 16px 20px;
 border-bottom: 1px solid var(--color-gray-200);
}

html.dark .av-table-card__toolbar {
 border-bottom-color: var(--color-dark-500);
}

.av-table-card__title {
 flex: 1 1 auto;
 min-width: 0;
 display: flex;
 flex-direction: column;
 gap: 2px;
}

.av-table-card__title-text.mud-typography {
 color: var(--color-gray-900);
}

html.dark .av-table-card__title-text.mud-typography {
 color: var(--color-dark-50);
}

.av-table-card__title-hint.mud-typography {
 color: var(--color-gray-500);
}

html.dark .av-table-card__title-hint.mud-typography {
 color: var(--color-dark-300);
}

.av-table-card__search {
 flex-shrink: 0;
 width: 280px;
 max-width: 100%;
}

/* Match the input height to the toolbar button height (32 px, set on
   `.av-table-card__btn`) so search + Add button read as a single horizontally
   aligned row. Mud's default Dense Outlined input sits at ~40px, which towers
   over the buttons; this override aligns them. Mirrors the same pattern
   applied to `.av-page-filters__search` above. */
.av-table-card__search .mud-input-control {
    height: 32px;
    min-height: 32px;
}

.av-table-card__search .mud-input-control .mud-input,
.av-table-card__search .mud-input-control .mud-input-slot {
    min-height: 32px;
    height: 32px;
}

.av-table-card__search .mud-input-control .mud-input-slot input {
    font-size: var(--text-xs);
    padding-top: 0;
    padding-bottom: 0;
}

.av-table-card__search .mud-input-control .mud-input-outlined-border {
    border-radius: var(--radius-md);
}

.av-table-card__search .mud-input-control .mud-input-adornment-start {
    margin-top: 0;
}

.av-table-card__search .mud-input-control .mud-input-adornment .mud-icon-root {
    width: 16px;
    height: 16px;
    font-size: 16px;
}

/* Toolbar tools cluster — search + primary action button side-by-side,
 replacing the legacy "search-only" slot when the toolbar needs an action. */
.av-table-card__tools {
 flex-shrink: 0;
 display: flex;
 align-items: center;
 gap: 8px;
}

/* Pill-shaped primary action on the toolbar (Add / New …). Matches the
 visual rhythm of MudTextField Margin="Dense" (~38px) so search + button
 line up. */
.av-table-card__btn.mud-button-root {
 background: var(--color-primary-600);
 color: var(--color-white);
 text-transform: none;
 letter-spacing: 0;
 border-radius: var(--radius-md);
 height: 32px;
 min-width: 0;
 padding: 0 12px;
 box-shadow: none;
}

.av-table-card__btn.mud-button-root .mud-button-label {
 font-weight: 500;
 font-size: var(--text-xs);
}

.av-table-card__btn.mud-button-root .mud-icon-root {
 width: 16px;
 height: 16px;
}

.av-table-card__btn.mud-button-root:hover {
 background: var(--color-primary-700);
 box-shadow: none;
}

html.dark .av-table-card__btn.mud-button-root {
 background: var(--color-primary-500);
}

html.dark .av-table-card__btn.mud-button-root:hover {
 background: var(--color-primary-400);
}

/* Disabled state — explicit gray rather than Mud's default opacity reduction
 on the primary fill. Used when an action is gated (e.g. "Next" until a
 template is selected). */
.av-table-card__btn.mud-button-root:disabled,
.av-table-card__btn.mud-button-root.mud-disabled,
.av-table-card__btn.mud-button-disabled {
 background: var(--color-gray-200) !important;
 color: var(--color-gray-400) !important;
 cursor: not-allowed;
 opacity: 1 !important;
}

html.dark .av-table-card__btn.mud-button-root:disabled,
html.dark .av-table-card__btn.mud-button-root.mud-disabled,
html.dark .av-table-card__btn.mud-button-disabled {
 background: var(--color-dark-600) !important;
 color: var(--color-dark-400) !important;
}

/* Clickable-row modifier — adds cursor:pointer so users know the row is
 interactive. Use on tables with OnRowClick to pick a record (wizards,
 pickers). Multi-row select tables should keep the default cursor. */
.av-tailux-table--clickable .mud-table-body .mud-table-row {
 cursor: pointer;
}

/* Secondary outlined toolbar button — pair to `av-table-card__btn`.
 Same rounded-full shape and height, transparent fill, gray-300 border. */

.av-table-card__btn-secondary.mud-button-root {
 background: transparent;
 color: var(--color-gray-700);
 border: 1px solid var(--color-gray-300);
 text-transform: none;
 letter-spacing: 0;
 border-radius: var(--radius-md);
 height: 32px;
 min-width: 0;
 padding: 0 12px;
 box-shadow: none;
}

.av-table-card__btn-secondary.mud-button-root .mud-button-label {
 font-weight: 500;
 font-size: var(--text-xs);
}

.av-table-card__btn-secondary.mud-button-root .mud-icon-root {
 width: 16px;
 height: 16px;
}

.av-table-card__btn-secondary.mud-button-root:hover {
 background: var(--color-gray-100);
 border-color: var(--color-gray-400);
 box-shadow: none;
}

html.dark .av-table-card__btn-secondary.mud-button-root {
 background: transparent;
 border-color: var(--color-dark-400);
 color: var(--color-dark-100);
}

html.dark .av-table-card__btn-secondary.mud-button-root:hover {
 background: var(--color-dark-600);
 border-color: var(--color-dark-300);
}

@media (max-width: 640px) {
 .av-table-card__toolbar {
 flex-direction: column;
 align-items: stretch;
 gap: 12px;
 }
 .av-table-card__search {
 width: 100%;
 }
 .av-table-card__tools {
 flex-direction: column;
 align-items: stretch;
 }
 .av-table-card__btn.mud-button-root {
 width: 100%;
 }
}

/* The MudTable lives flush inside the card so its head row meets the toolbar
 border without a double divider. */
.av-table-card .av-tailux-table .mud-table-container {
 border-radius: 0;
}

.av-table-card .av-tailux-table .mud-table-head .mud-table-cell:first-child,
.av-table-card .av-tailux-table .mud-table-head .mud-table-cell:last-child {
 border-radius: 0;
}

.av-table-card .av-tailux-table .mud-table-pagination,
.av-table-card .av-tailux-table .mud-table-pagination-toolbar {
 border: 0;
 border-top: 1px solid var(--color-gray-200);
 border-radius: 0;
 background: transparent;
}

html.dark .av-table-card .av-tailux-table .mud-table-pagination,
html.dark .av-table-card .av-tailux-table .mud-table-pagination-toolbar {
 border-top-color: var(--color-dark-500);
}

.av-address-card__actions {
 flex-shrink: 0;
 display: inline-flex;
 align-items: center;
 gap: 4px;
}

/* Edit / Add button used in the empty state. Sentence case, pill outline. */
.av-address-card__edit-btn.mud-button-root {
 color: var(--color-primary-600);
 background: transparent;
 border: 1px solid var(--color-gray-200);
 border-radius: 9999px;
 padding: 6px 14px;
 min-width: 0;
 text-transform: none;
 letter-spacing: 0;
}

.av-address-card__edit-btn.mud-button-root .mud-button-label {
 font-weight: 500;
}

.av-address-card__edit-btn.mud-button-root:hover {
 background: var(--color-gray-50);
 border-color: var(--color-gray-300);
}

html.dark .av-address-card__edit-btn.mud-button-root {
 color: var(--color-primary-300);
 border-color: var(--color-dark-500);
}

html.dark .av-address-card__edit-btn.mud-button-root:hover {
 background: var(--color-dark-600);
 border-color: var(--color-dark-400);
}

/* Icon-only round buttons used in the head actions row (Copy + Edit) */
.av-address-card__icon-btn.mud-icon-button {
 width: 32px;
 height: 32px;
 padding: 6px;
 border-radius: 9999px;
 color: var(--color-gray-600);
 background: transparent;
 transition: background-color 150ms ease, color 150ms ease;
}

.av-address-card__icon-btn.mud-icon-button:hover {
 background: var(--color-gray-100);
 color: var(--color-gray-900);
}

.av-address-card__icon-btn.mud-icon-button .mud-icon-root {
 width: 16px;
 height: 16px;
}

html.dark .av-address-card__icon-btn.mud-icon-button {
 color: var(--color-dark-200);
}

html.dark .av-address-card__icon-btn.mud-icon-button:hover {
 background: var(--color-dark-600);
 color: var(--color-dark-50);
}

/* Primary tint when the action is the main affordance of the card head */
.av-address-card__icon-btn--primary.mud-icon-button {
 color: var(--color-primary-600);
}

.av-address-card__icon-btn--primary.mud-icon-button:hover {
 background: rgb(from var(--color-primary-600) r g b / 0.10);
 color: var(--color-primary-700);
}

html.dark .av-address-card__icon-btn--primary.mud-icon-button {
 color: var(--color-primary-300);
}

html.dark .av-address-card__icon-btn--primary.mud-icon-button:hover {
 background: rgb(from var(--color-primary-400) r g b / 0.16);
 color: var(--color-primary-200);
}

/* Field grid — 2 cols, with a dashed divider between rows like the legacy card */
.av-address-card__grid {
 display: grid;
 grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
 gap: 12px 24px;
}

.av-address-card__grid + .av-address-card__grid {
 padding-top: 12px;
 border-top: 1px dashed var(--color-gray-200);
}

html.dark .av-address-card__grid + .av-address-card__grid {
 border-top-color: var(--color-dark-500);
}

@media (max-width: 640px) {
 .av-address-card__grid {
 grid-template-columns: minmax(0, 1fr);
 gap: 12px;
 }
}

.av-address-card__field {
 display: flex;
 flex-direction: column;
 gap: 4px;
 min-width: 0;
}

.av-address-card__label.mud-typography {
 color: var(--color-gray-500);
}

html.dark .av-address-card__label.mud-typography {
 color: var(--color-dark-300);
}

.av-address-card__value.mud-typography {
 color: var(--color-gray-900);
 word-break: break-word;
}

html.dark .av-address-card__value.mud-typography {
 color: var(--color-dark-50);
}

/* Empty state when there's no address yet */
.av-address-card__empty {
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 gap: 8px;
 padding: 28px 16px;
 text-align: center;
}

.av-address-card__empty-icon {
 width: 56px;
 height: 56px;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 border-radius: 9999px;
 background: var(--color-gray-100);
 color: var(--color-gray-500);
}

.av-address-card__empty-icon .mud-icon-root {
 width: 26px;
 height: 26px;
}

html.dark .av-address-card__empty-icon {
 background: var(--color-dark-600);
 color: var(--color-dark-300);
}

.av-address-card__empty-title.mud-typography {
 color: var(--color-gray-800);
}

html.dark .av-address-card__empty-title.mud-typography {
 color: var(--color-dark-100);
}

.av-address-card__empty-hint.mud-typography {
 color: var(--color-gray-600);
 max-width: 360px;
}

html.dark .av-address-card__empty-hint.mud-typography {
 color: var(--color-dark-200);
}

/* ===========================================================================
 §22 Pagination — app-wide pagination control
 Used by any table / list with a 1-based CurrentPage + PageSize + TotalCount
 tuple. Visual baseline: flat solid primary pill for the active page, no
 ripple / focus halo (we render buttons via MudElement HtmlTag="button"
 so MudButton's two-tone overlay does not apply).
 =========================================================================== */

.av-pagination {
 display: flex;
 align-items: center;
 justify-content: space-between;
 flex-wrap: wrap;
 gap: 12px;
 padding: 0.5rem 1rem;
 border-top: 1px solid var(--color-gray-200);
}

html.dark .av-pagination {
 border-top-color: var(--color-dark-500);
}

.av-pagination__info.mud-typography {
 color: var(--color-gray-600);
}

html.dark .av-pagination__info.mud-typography {
 color: var(--color-dark-200);
}

.av-pagination__controls {
 display: flex;
 align-items: center;
 gap: 4px;
}

.av-pagination__btn {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 width: 32px;
 height: 32px;
 padding: 0;
 border: 1px solid var(--color-gray-200);
 border-radius: var(--radius-md);
 background: var(--color-white);
 color: var(--color-gray-600);
 cursor: pointer;
 transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.av-pagination__btn:hover:not(:disabled) {
 background: var(--color-gray-100);
 border-color: var(--color-gray-300);
 color: var(--color-gray-900);
}

.av-pagination__btn:disabled {
 opacity: 0.45;
 cursor: not-allowed;
}

.av-pagination__btn .mud-icon-root {
 width: 16px;
 height: 16px;
}

html.dark .av-pagination__btn {
 background: var(--color-dark-700);
 border-color: var(--color-dark-500);
 color: var(--color-dark-200);
}

html.dark .av-pagination__btn:hover:not(:disabled) {
 background: var(--color-dark-600);
 border-color: var(--color-dark-400);
 color: var(--color-dark-50);
}

.av-pagination__numbers {
 display: flex;
 align-items: center;
 gap: 4px;
 margin: 0 4px;
}

.av-pagination__num {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 min-width: 32px;
 height: 32px;
 padding: 0 8px;
 border: 1px solid var(--color-gray-200);
 border-radius: var(--radius-md);
 background: var(--color-white);
 color: var(--color-gray-600);
 cursor: pointer;
 transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.av-pagination__num:hover:not(.av-pagination__num--active) {
 background: var(--color-gray-100);
 border-color: var(--color-gray-300);
 color: var(--color-gray-900);
}

.av-pagination__num--active {
 background: var(--color-primary-600);
 border-color: var(--color-primary-600);
 color: var(--color-white);
 cursor: default;
}

.av-pagination__num--active:hover {
 background: var(--color-primary-600);
 border-color: var(--color-primary-600);
 color: var(--color-white);
}

html.dark .av-pagination__num {
 background: var(--color-dark-700);
 border-color: var(--color-dark-500);
 color: var(--color-dark-200);
}

html.dark .av-pagination__num:hover:not(.av-pagination__num--active) {
 background: var(--color-dark-600);
 border-color: var(--color-dark-400);
 color: var(--color-dark-50);
}

html.dark .av-pagination__num--active {
 background: var(--color-primary-500);
 border-color: var(--color-primary-500);
 color: var(--color-white);
}

html.dark .av-pagination__num--active:hover {
 background: var(--color-primary-500);
 border-color: var(--color-primary-500);
 color: var(--color-white);
}

.av-pagination__ellipsis {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 width: 32px;
 height: 32px;
 color: var(--color-gray-400);
}

html.dark .av-pagination__ellipsis {
 color: var(--color-dark-300);
}

.av-pagination__size {
 display: flex;
 align-items: center;
 gap: 8px;
}

.av-pagination__size .mud-typography {
 color: var(--color-gray-600);
}

html.dark .av-pagination__size .mud-typography {
 color: var(--color-dark-200);
}

.av-pagination__select {
 width: 80px;
 min-width: 80px;
}

@media (max-width: 640px) {
 .av-pagination {
 flex-direction: column;
 align-items: stretch;
 text-align: center;
 }

 .av-pagination__controls {
 justify-content: center;
 }

 .av-pagination__size {
 justify-content: center;
 }

 .av-pagination__numbers {
 display: none;
 }
}

/* ===========================================================================
 §23 Permission list — read-only chip-row list used inside ShowPermissionsDialog
 (and any other surface that needs to render a flat list of permission names).
 =========================================================================== */

.av-permission-list {
 list-style: none;
 padding: 0;
 margin: 0;
 display: grid;
 grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
 gap: 8px;
 max-height: 380px;
 overflow-y: auto;
 padding-right: 4px;
}

.av-permission-list__item {
 display: flex;
 align-items: center;
 gap: 10px;
 padding: 8px 12px;
 border-radius: var(--radius-md);
 background: var(--color-gray-50);
 border: 1px solid var(--color-gray-100);
 min-width: 0;
}

html.dark .av-permission-list__item {
 background: rgb(from var(--color-dark-500) r g b / 0.30);
 border-color: var(--color-dark-500);
}

.av-permission-list__icon-wrap {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 width: 24px;
 height: 24px;
 border-radius: 9999px;
 background: rgb(from var(--color-primary-600) r g b / 0.10);
 color: var(--color-primary-600);
 flex-shrink: 0;
}

.av-permission-list__icon-wrap .mud-icon-root {
 width: 14px;
 height: 14px;
}

html.dark .av-permission-list__icon-wrap {
 background: rgb(from var(--color-primary-400) r g b / 0.16);
 color: var(--color-primary-300);
}

.av-permission-list__text.mud-typography {
 color: var(--color-gray-800);
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}

html.dark .av-permission-list__text.mud-typography {
 color: var(--color-dark-50);
}

/* Empty state when the search yields no matches */
.av-permission-list__empty {
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 gap: 8px;
 padding: 32px 16px;
 border-radius: var(--radius-lg);
 background: var(--color-gray-50);
 border: 1px dashed var(--color-gray-200);
 color: var(--color-gray-500);
}

html.dark .av-permission-list__empty {
 background: rgb(from var(--color-dark-500) r g b / 0.20);
 border-color: var(--color-dark-500);
 color: var(--color-dark-300);
}

.av-permission-list__empty-icon.mud-icon-root {
 width: 28px;
 height: 28px;
}

.av-permission-list__empty-text.mud-typography {
 color: inherit;
}

/* ===========================================================================
 §24 Permission tree — wrapper around MudTreeView used in AddRoleDialog so
 the tree reads as a framed control instead of a bare list on top of the
 dialog background.
 =========================================================================== */

.av-permission-tree {
 border-radius: var(--radius-lg);
 border: 1px solid var(--color-gray-200);
 background: var(--color-white);
 overflow: hidden;
}

html.dark .av-permission-tree {
 background: var(--color-dark-700);
 border-color: var(--color-dark-500);
}

.av-permission-tree__header {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 12px;
 padding: 12px 16px;
 border-bottom: 1px solid var(--color-gray-100);
 background: var(--color-gray-50);
}

html.dark .av-permission-tree__header {
 background: rgb(from var(--color-dark-500) r g b / 0.30);
 border-bottom-color: var(--color-dark-500);
}

.av-permission-tree__title {
 display: inline-flex;
 align-items: center;
 gap: 10px;
 min-width: 0;
}

/* Two-line title (title + hint) used in page-level placements */
.av-permission-tree__title-text-wrap {
 display: flex;
 flex-direction: column;
 gap: 2px;
 min-width: 0;
}

.av-permission-tree__title-hint.mud-typography {
 color: var(--color-gray-500);
}

html.dark .av-permission-tree__title-hint.mud-typography {
 color: var(--color-dark-300);
}

/* Page-level placement: the tree sits on the page background instead of a
 dialog body, so the framing border softens slightly. */
.av-permission-tree--page {
 border-color: var(--color-gray-200);
}

html.dark .av-permission-tree--page {
 border-color: var(--color-dark-500);
}

.av-permission-tree__title-icon.mud-icon-root {
 color: var(--color-primary-600);
 width: 18px;
 height: 18px;
}

html.dark .av-permission-tree__title-icon.mud-icon-root {
 color: var(--color-primary-300);
}

.av-permission-tree__title-text.mud-typography {
 color: var(--color-gray-900);
}

html.dark .av-permission-tree__title-text.mud-typography {
 color: var(--color-dark-50);
}

.av-permission-tree__body {
 max-height: 360px;
 overflow-y: auto;
 padding: 8px 4px;
 background: var(--color-white);
}

html.dark .av-permission-tree__body {
 background: var(--color-dark-700);
}

/* Tall variant for full-page placements where the tree is the main canvas */
.av-permission-tree__body--tall {
 max-height: 60vh;
 padding: 12px 8px;
}

/* Tighten Mud's row spacing so the tree reads as a compact, professional list.
 Parent rows keep a tight 4px vertical rhythm; child rows (the ones rendered
 inside a `.mud-collapse-wrapper` when a parent is expanded) get 8px so they
 read clearly without the chevron / icon column making them feel cramped. */
.av-permission-tree .mud-treeview-item {
 background: transparent !important;
}

.av-permission-tree .mud-treeview-item-content {
 padding: 4px 8px;
 gap: 8px;
 border-radius: var(--radius-md);
 transition: background-color 120ms ease;
}

.av-permission-tree .mud-treeview-item-content:hover {
 background: var(--color-gray-100);
}

html.dark .av-permission-tree .mud-treeview-item-content:hover {
 background: rgb(from var(--color-dark-500) r g b / 0.40);
}

.av-permission-tree .mud-treeview-item-label {
 color: var(--color-gray-800);
 font-size: var(--text-xs-plus);
}

html.dark .av-permission-tree .mud-treeview-item-label {
 color: var(--color-dark-100);
}

/* Slightly larger gap between sibling nodes so the rows do not feel glued */
.av-permission-tree .mud-treeview-group .mud-treeview-item + .mud-treeview-item,
.av-permission-tree > .mud-treeview-item + .mud-treeview-item {
 margin-top: 2px;
}

/* MudBlazor reserves a 32px-wide icon slot per tree item (plus 4px right
 margin) regardless of whether the item actually has an icon — that's
 ~36px of dead space before every label that reads as accidental padding.
 Shrink the slot to just-enough for our lock icon (14px) and drop the
 margin. The slot stays a fixed width so locked / non-locked siblings
 still align vertically; non-locked items just have a slightly smaller
 empty slot. */
.av-permission-tree .mud-treeview-item-icon {
 width: 18px;
 margin-right: 0;
 margin-inline-end: 0;
}

/* Within that tighter slot, right-align the lock so it lands against the
 label text instead of being centered with empty space on both sides. */
.av-permission-tree .fixed-permission-item .mud-treeview-item-icon {
 justify-content: flex-end;
}

/* Indeterminate (partial-selection) parent visual.
 MudBlazor 9.2 applies `.mud-checkbox-null` to a parent's checkbox button
 when its loaded children are partially selected (driven by AutoSelectParent
 + TriState). The library ships the class as a hook but provides NO default
 visual rules for it, and inside an ItemTemplate the IndeterminateIcon swap
 doesn't reliably fire — the rendered SVG stays as CheckBoxOutlineBlank.
 We paint the indeterminate visual explicitly: filled primary square with
 a white horizontal dash, matching Material Design's IndeterminateCheckBox. */
.av-permission-tree__view .mud-treeview-item-checkbox .mud-icon-button.mud-checkbox-null {
 position: relative;
 color: var(--color-primary-600);
}

 /* Hide the SVG MudBlazor renders (it doesn't match the null state). */
 .av-permission-tree__view .mud-treeview-item-checkbox .mud-icon-button.mud-checkbox-null .mud-icon-root {
 visibility: hidden;
 }

 /* Filled square — same size and radius as Material's IndeterminateCheckBox. */
 .av-permission-tree__view .mud-treeview-item-checkbox .mud-icon-button.mud-checkbox-null::before {
 content: '';
 position: absolute;
 top: 50%;
 left: 50%;
 transform: translate(-50%, -50%);
 width: 18px;
 height: 18px;
 background-color: currentColor;
 border-radius: 3px;
 pointer-events: none;
 }

 /* Horizontal dash inside the square. */
 .av-permission-tree__view .mud-treeview-item-checkbox .mud-icon-button.mud-checkbox-null::after {
 content: '';
 position: absolute;
 top: 50%;
 left: 50%;
 transform: translate(-50%, -50%);
 width: 10px;
 height: 2px;
 background-color: var(--color-white);
 border-radius: 1px;
 pointer-events: none;
 }

html.dark .av-permission-tree__view .mud-treeview-item-checkbox .mud-icon-button.mud-checkbox-null {
 color: var(--color-primary-400);
}

/* ===========================================================================
 §25 Form errors — friendly inline error block inside a form-dialog body.
 Replaces the legacy MudExpansionPanel "Validation Summary" UI.
 =========================================================================== */

.av-form-errors {
 display: flex;
 align-items: flex-start;
 gap: 10px;
 padding: 12px 14px;
 margin-top: 12px;
 border-radius: var(--radius-md);
 background: rgb(from var(--color-error) r g b / 0.08);
 border: 1px solid rgb(from var(--color-error) r g b / 0.25);
 color: var(--color-error-darker);
}

html.dark .av-form-errors {
 background: rgb(from var(--color-error) r g b / 0.14);
 border-color: rgb(from var(--color-error) r g b / 0.35);
 color: var(--color-error-light);
}

.av-form-errors__icon.mud-icon-root {
 color: inherit;
 width: 18px;
 height: 18px;
 flex-shrink: 0;
 margin-top: 2px;
}

.av-form-errors__list {
 list-style: disc;
 padding-left: 16px;
 margin: 0;
 display: flex;
 flex-direction: column;
 gap: 2px;
}

.av-form-errors__item .mud-typography {
 color: inherit;
}

/* ===========================================================================
 §26 Av-Avatar Group — stacked overlap pattern (avatars share a ring).
 Use as <div class="av-avatar-group"> wrapping MudAvatars. Each avatar
 overlaps the previous by 8px and shows a 2px surface-color ring.
 =========================================================================== */

.av-avatar-group {
 display: inline-flex;
}

.av-avatar-group > .mud-avatar {
 margin-inline-start: -8px;
 box-shadow: 0 0 0 2px var(--color-white);
 transition: transform 150ms ease, z-index 150ms ease;
 position: relative;
}

.av-avatar-group > .mud-avatar:first-child {
 margin-inline-start: 0;
}

.av-avatar-group > .mud-avatar:hover {
 transform: translateY(-2px);
 z-index: 1;
}

html.dark .av-avatar-group > .mud-avatar {
 box-shadow: 0 0 0 2px var(--color-dark-800);
}

/* ===========================================================================
 §27 Av-Avatar Dot — small status indicator on a corner of an avatar.
 Mount inside a positioned wrapper:
 <div class="av-avatar-with-dot">
 <MudAvatar>...</MudAvatar>
 <span class="av-avatar-dot av-avatar-dot--success av-avatar-dot--bottom-right" />
 </div>
 Positions and colors via modifier classes. Optional --ping for pulsing halo.
 =========================================================================== */

.av-avatar-with-dot {
 position: relative;
 display: inline-flex;
}

.av-avatar-dot {
 position: absolute;
 width: 12px;
 height: 12px;
 border-radius: 9999px;
 border: 2px solid var(--color-white);
 background-color: var(--color-gray-500);
 z-index: 1;
 pointer-events: none;
}

html.dark .av-avatar-dot {
 border-color: var(--color-dark-800);
}

/* Position modifiers */
.av-avatar-dot--top-right { top: 0; right: 0; }
.av-avatar-dot--top-left { top: 0; left: 0; }
.av-avatar-dot--bottom-right { bottom: 0; right: 0; }
.av-avatar-dot--bottom-left { bottom: 0; left: 0; }

/* Color modifiers */
.av-avatar-dot--default { background-color: var(--color-gray-500); }
.av-avatar-dot--primary { background-color: var(--color-primary-600); }
.av-avatar-dot--secondary { background-color: var(--color-secondary); }
.av-avatar-dot--info { background-color: var(--color-info); }
.av-avatar-dot--success { background-color: var(--color-success); }
.av-avatar-dot--warning { background-color: var(--color-warning); }
.av-avatar-dot--error { background-color: var(--color-error); }

/* Ping animation — pulsing halo */
.av-avatar-dot--ping::before {
 content: '';
 position: absolute;
 inset: 0;
 border-radius: inherit;
 background-color: inherit;
 opacity: 0.6;
 animation: av-avatar-dot-ping 1.4s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes av-avatar-dot-ping {
 0% { transform: scale(1); opacity: 0.6; }
 75% { transform: scale(2.2); opacity: 0; }
 100% { transform: scale(2.2); opacity: 0; }
}

/* ===========================================================================
 §28 Av-Card Selected — visual selected state for clickable MudPaper cards.
 Apply additively: <MudPaper Outlined="true" Class="av-card-selected"> when
 the card represents the active selection. Primary-color outer ring + inner
 border emphasis. Theme-aware.
 =========================================================================== */

.av-card-selected.mud-paper {
 border-color: var(--color-primary-500);
 box-shadow:
 0 0 0 1px var(--color-primary-500),
 0 0 0 4px rgb(from var(--color-primary-500) r g b / 0.15);
}

html.dark .av-card-selected.mud-paper {
 border-color: var(--color-primary-400);
 box-shadow:
 0 0 0 1px var(--color-primary-400),
 0 0 0 4px rgb(from var(--color-primary-400) r g b / 0.20);
}

/* ===========================================================================
 §29 Av-Chip Soft — compact "soft" variant for MudChip.
 Light tinted background + colored text + tighter padding + reduced radius.
 Use additively: <MudChip Class="av-chip-soft" Color="Color.Primary">. Works
 with all standard MudChip Color values. Replaces Mud's chip visual entirely
 (any Variant prop on the MudChip is overridden by this class).
 =========================================================================== */

.av-chip-soft.mud-chip {
 border-radius: 4px;
 padding: 2px 8px;
 font-size: 0.6875rem;
 font-weight: 600;
 line-height: 1.3;
 letter-spacing: 0.02em;
 height: auto;
 min-height: 0;
 border: 0;
}

.av-chip-soft.mud-chip .mud-chip-icon {
 font-size: 0.875rem;
 width: 0.875rem;
 height: 0.875rem;
}

/* Color tints */
.av-chip-soft.mud-chip.mud-chip-color-primary {
 background-color: rgb(from var(--color-primary-600) r g b / 0.10);
 color: var(--color-primary-700);
}
html.dark .av-chip-soft.mud-chip.mud-chip-color-primary {
 background-color: rgb(from var(--color-primary-400) r g b / 0.18);
 color: var(--color-primary-300);
}

.av-chip-soft.mud-chip.mud-chip-color-secondary {
 background-color: rgb(from var(--color-secondary) r g b / 0.10);
 color: var(--color-secondary-darker);
}
html.dark .av-chip-soft.mud-chip.mud-chip-color-secondary {
 background-color: rgb(from var(--color-secondary) r g b / 0.20);
 color: var(--color-secondary-light);
}

.av-chip-soft.mud-chip.mud-chip-color-info {
 background-color: rgb(from var(--color-info) r g b / 0.10);
 color: var(--color-info-darker);
}
html.dark .av-chip-soft.mud-chip.mud-chip-color-info {
 background-color: rgb(from var(--color-info) r g b / 0.20);
 color: var(--color-info-light);
}

.av-chip-soft.mud-chip.mud-chip-color-success {
 background-color: rgb(from var(--color-success) r g b / 0.12);
 color: var(--color-success-darker);
}
html.dark .av-chip-soft.mud-chip.mud-chip-color-success {
 background-color: rgb(from var(--color-success) r g b / 0.22);
 color: var(--color-success-light);
}

.av-chip-soft.mud-chip.mud-chip-color-warning {
 background-color: rgb(from var(--color-warning) r g b / 0.14);
 color: var(--color-warning-darker);
}
html.dark .av-chip-soft.mud-chip.mud-chip-color-warning {
 background-color: rgb(from var(--color-warning) r g b / 0.22);
 color: var(--color-warning-light);
}

.av-chip-soft.mud-chip.mud-chip-color-error {
 background-color: rgb(from var(--color-error) r g b / 0.10);
 color: var(--color-error-darker);
}
html.dark .av-chip-soft.mud-chip.mud-chip-color-error {
 background-color: rgb(from var(--color-error) r g b / 0.20);
 color: var(--color-error-light);
}

.av-chip-soft.mud-chip.mud-chip-color-default {
 background-color: rgb(from var(--color-gray-900) r g b / 0.08);
 color: var(--color-gray-800);
}
html.dark .av-chip-soft.mud-chip.mud-chip-color-default {
 background-color: rgb(from var(--color-white) r g b / 0.10);
 color: var(--color-dark-100);
}

/* ===========================================================================
 §30 Av-Checkbox / Av-Radio color & size modifiers — opt-in extensions
 to the base skin (rows ~913–1037 of this file).
 The base skin hard-codes primary color and a fixed 18-px box; these
 modifiers let the showcase (and any future caller) opt into multi-color
 and multi-size variants without touching the canonical primary look used
 by LeadSourceDialog and other production dialogs.
 Apply additively, e.g.:
 <MudCheckBox Class="av-checkbox-color-success av-checkbox-sm" .../>
 <MudRadio Class="av-radio-color-error av-radio-lg" .../>
 =========================================================================== */

/* --- Color modifiers — override the checked/indeterminate base color ---
   html.dark counterparts REQUERIDOS: las reglas base `html.dark .mud-checkbox:has(input:checked)
   .mud-icon-button` (§30 base, line ~1014) tienen specificity (0,4,1) y ganan sobre estos
   modifiers (0,4,0) en dark mode. Sin contraparte dark, todos los color modifiers caen al
   primary-400 base en dark. Cada modifier necesita su counterpart html.dark explícito. */
.av-checkbox-color-default .mud-checkbox:has(input:checked) .mud-icon-button,
.av-checkbox-color-default .mud-checkbox:has(input:indeterminate) .mud-icon-button,
.av-radio-color-default .mud-radio:has(input:checked) .mud-icon-button {
 background-color: var(--color-gray-700) !important;
 border-color: var(--color-gray-700) !important;
}
html.dark .av-checkbox-color-default .mud-checkbox:has(input:checked) .mud-icon-button,
html.dark .av-checkbox-color-default .mud-checkbox:has(input:indeterminate) .mud-icon-button,
html.dark .av-radio-color-default .mud-radio:has(input:checked) .mud-icon-button {
 background-color: var(--color-gray-500) !important;
 border-color: var(--color-gray-500) !important;
}

.av-checkbox-color-secondary .mud-checkbox:has(input:checked) .mud-icon-button,
.av-checkbox-color-secondary .mud-checkbox:has(input:indeterminate) .mud-icon-button,
.av-radio-color-secondary .mud-radio:has(input:checked) .mud-icon-button {
 background-color: var(--color-secondary) !important;
 border-color: var(--color-secondary) !important;
}
html.dark .av-checkbox-color-secondary .mud-checkbox:has(input:checked) .mud-icon-button,
html.dark .av-checkbox-color-secondary .mud-checkbox:has(input:indeterminate) .mud-icon-button,
html.dark .av-radio-color-secondary .mud-radio:has(input:checked) .mud-icon-button {
 background-color: var(--color-secondary-light) !important;
 border-color: var(--color-secondary-light) !important;
}

.av-checkbox-color-tertiary .mud-checkbox:has(input:checked) .mud-icon-button,
.av-checkbox-color-tertiary .mud-checkbox:has(input:indeterminate) .mud-icon-button,
.av-radio-color-tertiary .mud-radio:has(input:checked) .mud-icon-button {
 background-color: var(--color-secondary-light) !important;
 border-color: var(--color-secondary-light) !important;
}
html.dark .av-checkbox-color-tertiary .mud-checkbox:has(input:checked) .mud-icon-button,
html.dark .av-checkbox-color-tertiary .mud-checkbox:has(input:indeterminate) .mud-icon-button,
html.dark .av-radio-color-tertiary .mud-radio:has(input:checked) .mud-icon-button {
 background-color: var(--color-secondary-lighter) !important;
 border-color: var(--color-secondary-lighter) !important;
}

.av-checkbox-color-info .mud-checkbox:has(input:checked) .mud-icon-button,
.av-checkbox-color-info .mud-checkbox:has(input:indeterminate) .mud-icon-button,
.av-radio-color-info .mud-radio:has(input:checked) .mud-icon-button {
 background-color: var(--color-info) !important;
 border-color: var(--color-info) !important;
}
html.dark .av-checkbox-color-info .mud-checkbox:has(input:checked) .mud-icon-button,
html.dark .av-checkbox-color-info .mud-checkbox:has(input:indeterminate) .mud-icon-button,
html.dark .av-radio-color-info .mud-radio:has(input:checked) .mud-icon-button {
 background-color: var(--color-info-light) !important;
 border-color: var(--color-info-light) !important;
}

.av-checkbox-color-success .mud-checkbox:has(input:checked) .mud-icon-button,
.av-checkbox-color-success .mud-checkbox:has(input:indeterminate) .mud-icon-button,
.av-radio-color-success .mud-radio:has(input:checked) .mud-icon-button {
 background-color: var(--color-success) !important;
 border-color: var(--color-success) !important;
}
html.dark .av-checkbox-color-success .mud-checkbox:has(input:checked) .mud-icon-button,
html.dark .av-checkbox-color-success .mud-checkbox:has(input:indeterminate) .mud-icon-button,
html.dark .av-radio-color-success .mud-radio:has(input:checked) .mud-icon-button {
 background-color: var(--color-success-light) !important;
 border-color: var(--color-success-light) !important;
}

.av-checkbox-color-warning .mud-checkbox:has(input:checked) .mud-icon-button,
.av-checkbox-color-warning .mud-checkbox:has(input:indeterminate) .mud-icon-button,
.av-radio-color-warning .mud-radio:has(input:checked) .mud-icon-button {
 background-color: var(--color-warning) !important;
 border-color: var(--color-warning) !important;
}
html.dark .av-checkbox-color-warning .mud-checkbox:has(input:checked) .mud-icon-button,
html.dark .av-checkbox-color-warning .mud-checkbox:has(input:indeterminate) .mud-icon-button,
html.dark .av-radio-color-warning .mud-radio:has(input:checked) .mud-icon-button {
 background-color: var(--color-warning-light) !important;
 border-color: var(--color-warning-light) !important;
}

.av-checkbox-color-error .mud-checkbox:has(input:checked) .mud-icon-button,
.av-checkbox-color-error .mud-checkbox:has(input:indeterminate) .mud-icon-button,
.av-radio-color-error .mud-radio:has(input:checked) .mud-icon-button {
 background-color: var(--color-error) !important;
 border-color: var(--color-error) !important;
}
html.dark .av-checkbox-color-error .mud-checkbox:has(input:checked) .mud-icon-button,
html.dark .av-checkbox-color-error .mud-checkbox:has(input:indeterminate) .mud-icon-button,
html.dark .av-radio-color-error .mud-radio:has(input:checked) .mud-icon-button {
 background-color: var(--color-error-light) !important;
 border-color: var(--color-error-light) !important;
}

/* Hover/focus tints on the modifier — keep the border-only emphasis when
 the box is NOT checked, matching the base behavior. */
.av-checkbox-color-success .mud-checkbox:not(:has(input:checked)):not(:has(input:indeterminate)):not(.mud-disabled):hover .mud-icon-button,
.av-checkbox-color-success .mud-checkbox:not(:has(input:checked)):not(:has(input:indeterminate)):not(.mud-disabled):focus-within .mud-icon-button,
.av-radio-color-success .mud-radio:not(:has(input:checked)):not(.mud-disabled):hover .mud-icon-button,
.av-radio-color-success .mud-radio:not(:has(input:checked)):not(.mud-disabled):focus-within .mud-icon-button {
 border-color: var(--color-success) !important;
}
.av-checkbox-color-warning .mud-checkbox:not(:has(input:checked)):not(:has(input:indeterminate)):not(.mud-disabled):hover .mud-icon-button,
.av-checkbox-color-warning .mud-checkbox:not(:has(input:checked)):not(:has(input:indeterminate)):not(.mud-disabled):focus-within .mud-icon-button,
.av-radio-color-warning .mud-radio:not(:has(input:checked)):not(.mud-disabled):hover .mud-icon-button,
.av-radio-color-warning .mud-radio:not(:has(input:checked)):not(.mud-disabled):focus-within .mud-icon-button {
 border-color: var(--color-warning) !important;
}
.av-checkbox-color-error .mud-checkbox:not(:has(input:checked)):not(:has(input:indeterminate)):not(.mud-disabled):hover .mud-icon-button,
.av-checkbox-color-error .mud-checkbox:not(:has(input:checked)):not(:has(input:indeterminate)):not(.mud-disabled):focus-within .mud-icon-button,
.av-radio-color-error .mud-radio:not(:has(input:checked)):not(.mud-disabled):hover .mud-icon-button,
.av-radio-color-error .mud-radio:not(:has(input:checked)):not(.mud-disabled):focus-within .mud-icon-button {
 border-color: var(--color-error) !important;
}
.av-checkbox-color-info .mud-checkbox:not(:has(input:checked)):not(:has(input:indeterminate)):not(.mud-disabled):hover .mud-icon-button,
.av-checkbox-color-info .mud-checkbox:not(:has(input:checked)):not(:has(input:indeterminate)):not(.mud-disabled):focus-within .mud-icon-button,
.av-radio-color-info .mud-radio:not(:has(input:checked)):not(.mud-disabled):hover .mud-icon-button,
.av-radio-color-info .mud-radio:not(:has(input:checked)):not(.mud-disabled):focus-within .mud-icon-button {
 border-color: var(--color-info) !important;
}
.av-checkbox-color-secondary .mud-checkbox:not(:has(input:checked)):not(:has(input:indeterminate)):not(.mud-disabled):hover .mud-icon-button,
.av-checkbox-color-secondary .mud-checkbox:not(:has(input:checked)):not(:has(input:indeterminate)):not(.mud-disabled):focus-within .mud-icon-button,
.av-radio-color-secondary .mud-radio:not(:has(input:checked)):not(.mud-disabled):hover .mud-icon-button,
.av-radio-color-secondary .mud-radio:not(:has(input:checked)):not(.mud-disabled):focus-within .mud-icon-button {
 border-color: var(--color-secondary) !important;
}

/* --- Size modifiers — override fixed box width/height + checkmark size ---
 Escala Guía Visual: xs (14 px = size-3.5) · sm (16 px = size-4) · default Mud (~18 px) ·
 md (24 px = size-6) · lg (28 px = size-7). 5 sizes alineadas con el demo
 forms/checkbox/CheckboxSizes.jsx. */

.av-checkbox-xs .mud-checkbox .mud-icon-button,
.av-radio-xs .mud-radio .mud-icon-button {
 width: 14px !important;
 height: 14px !important;
}
.av-checkbox-xs .mud-checkbox:has(input:checked) .mud-icon-button::after {
 background-size: 10px 10px !important;
}
.av-checkbox-xs .mud-checkbox:has(input:indeterminate) .mud-icon-button::after {
 width: 7px !important;
}

.av-checkbox-sm .mud-checkbox .mud-icon-button,
.av-radio-sm .mud-radio .mud-icon-button {
 width: 16px !important;
 height: 16px !important;
}
.av-checkbox-sm .mud-checkbox:has(input:checked) .mud-icon-button::after {
 background-size: 12px 12px !important;
}
.av-checkbox-sm .mud-checkbox:has(input:indeterminate) .mud-icon-button::after {
 width: 8px !important;
}
.av-radio-sm .mud-radio:has(input:checked) .mud-icon-button::after {
 width: 5px !important;
 height: 5px !important;
}

.av-checkbox-md .mud-checkbox .mud-icon-button,
.av-radio-md .mud-radio .mud-icon-button {
 width: 24px !important;
 height: 24px !important;
}
.av-checkbox-md .mud-checkbox:has(input:checked) .mud-icon-button::after {
 background-size: 18px 18px !important;
}
.av-checkbox-md .mud-checkbox:has(input:indeterminate) .mud-icon-button::after {
 width: 12px !important;
}

.av-checkbox-lg .mud-checkbox .mud-icon-button,
.av-radio-lg .mud-radio .mud-icon-button {
 width: 28px !important;
 height: 28px !important;
}
.av-checkbox-lg .mud-checkbox:has(input:checked) .mud-icon-button::after {
 background-size: 22px 22px !important;
}
.av-checkbox-lg .mud-checkbox:has(input:indeterminate) .mud-icon-button::after {
 width: 14px !important;
}
.av-radio-lg .mud-radio:has(input:checked) .mud-icon-button::after {
 width: 10px !important;
 height: 10px !important;
}

/* --- Custom card pattern (Guía Visual Custom demo) — <label> wrapper clickable
 con border que cambia a primary-500 + ring primary/30 cuando el checkbox
 interior está checked. Hidden checkbox visualmente (opacity 0) salvo cuando
 está checked. Pensado para grids de selección rica (Frameworks, options,
 feature toggles con icon + label). */
.av-checkbox-card {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 8px;
 padding: 12px;
 border-radius: var(--radius-lg);
 border: 1px solid var(--color-gray-200);
 cursor: pointer;
 transition: border-color 150ms ease, box-shadow 150ms ease;
 background-color: var(--color-white);
}
html.dark .av-checkbox-card {
 border-color: var(--color-dark-600);
 background-color: var(--color-dark-700);
}

/* Checked state — border + ring primary-500. */
.av-checkbox-card:has(.mud-checkbox input:checked) {
 border-color: var(--color-primary-500);
 box-shadow: 0 0 0 1px rgb(from var(--color-primary-500) r g b / 0.30);
}

/* Hide the checkbox box when unchecked; reveal on check.
 Mantenemos pointer-events para que el toggle siga funcionando vía la <label>. */
.av-checkbox-card .mud-checkbox .mud-icon-button {
 opacity: 0;
 transition: opacity 150ms ease;
}
.av-checkbox-card:has(.mud-checkbox input:checked) .mud-checkbox .mud-icon-button {
 opacity: 1;
}

/* ===========================================================================
 §31 Av-Avatar Squircle — Guía Visual exact via SVG mask-image.
 Implementación pixel-perfect del patrón Guía Visual `mask is-squircle`
 (superellipse / iOS-style rounded square). El mask vive como token
 --av-squircle-mask en design-tokens.css y se consume vía mask-image.
 Previamente se aproximaba con border-radius:30% pero la transición de
 esquina del squircle es matemáticamente distinta — smoother corner.
 Esta versión replica el demo Guía Visual pixel-perfect.
 border-radius:0 explícito anula cualquier radius heredado de MudAvatar
 para que no compita con el mask.
 Apply additively: <MudAvatar Class="av-avatar-squircle">.
 =========================================================================== */

.av-avatar-squircle.mud-avatar {
 border-radius: 0 !important;
 -webkit-mask-image: var(--av-squircle-mask);
 mask-image: var(--av-squircle-mask);
 -webkit-mask-size: contain;
 mask-size: contain;
 -webkit-mask-position: center;
 mask-position: center;
 -webkit-mask-repeat: no-repeat;
 mask-repeat: no-repeat;
}

/* ===========================================================================
 §32 Av-Chip-Soft modifiers — Rounded (pill) + Glow (halo shadow).
 Both opt-in via additive class on top of .av-chip-soft.
 =========================================================================== */

.av-chip-soft.av-chip-soft-rounded.mud-chip {
 border-radius: 9999px;
 padding: 2px 10px;
}

.av-chip-soft.av-chip-soft-glow.mud-chip.mud-chip-color-primary {
 box-shadow: 0 2px 8px -2px rgb(from var(--color-primary-600) r g b / 0.45);
}
.av-chip-soft.av-chip-soft-glow.mud-chip.mud-chip-color-secondary {
 box-shadow: 0 2px 8px -2px rgb(from var(--color-secondary) r g b / 0.45);
}
.av-chip-soft.av-chip-soft-glow.mud-chip.mud-chip-color-info {
 box-shadow: 0 2px 8px -2px rgb(from var(--color-info) r g b / 0.45);
}
.av-chip-soft.av-chip-soft-glow.mud-chip.mud-chip-color-success {
 box-shadow: 0 2px 8px -2px rgb(from var(--color-success) r g b / 0.45);
}
.av-chip-soft.av-chip-soft-glow.mud-chip.mud-chip-color-warning {
 box-shadow: 0 2px 8px -2px rgb(from var(--color-warning) r g b / 0.45);
}
.av-chip-soft.av-chip-soft-glow.mud-chip.mud-chip-color-error {
 box-shadow: 0 2px 8px -2px rgb(from var(--color-error) r g b / 0.45);
}

/* ===========================================================================
 §33 Av-Checkbox shape variants — Rounded / SquareRounded / Outlined.
 Apply additively on top of optional color modifiers from §30:
 <MudCheckBox Class="av-checkbox-rounded av-checkbox-color-success" .../>
 <MudCheckBox Class="av-checkbox-outlined av-checkbox-color-warning" .../>
 =========================================================================== */

/* --- Rounded — circular box --- */
.av-checkbox-rounded .mud-checkbox .mud-icon-button {
 border-radius: 50% !important;
}

/* --- SquareRounded — larger corner radius square --- */
.av-checkbox-square-rounded .mud-checkbox .mud-icon-button {
 border-radius: var(--radius-md) !important;
}

/* --- Outlined — transparent bg on checked + colored checkmark via mask --- */
.av-checkbox-outlined .mud-checkbox:has(input:checked) .mud-icon-button,
.av-checkbox-outlined .mud-checkbox:has(input:indeterminate) .mud-icon-button {
 background-color: transparent !important;
 --av-check-color: var(--color-primary-600);
}

html.dark .av-checkbox-outlined .mud-checkbox:has(input:checked) .mud-icon-button,
html.dark .av-checkbox-outlined .mud-checkbox:has(input:indeterminate) .mud-icon-button {
 --av-check-color: var(--color-primary-400);
}

/* Replace the white SVG checkmark with a mask using --av-check-color */
.av-checkbox-outlined .mud-checkbox:has(input:checked) .mud-icon-button::after {
 background-image: none !important;
 background-color: var(--av-check-color) !important;
 -webkit-mask-image: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 1 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0z'/></svg>");
 mask-image: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 1 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0z'/></svg>");
 -webkit-mask-repeat: no-repeat;
 mask-repeat: no-repeat;
 -webkit-mask-position: center;
 mask-position: center;
 -webkit-mask-size: 14px 14px;
 mask-size: 14px 14px;
}

.av-checkbox-outlined .mud-checkbox:has(input:indeterminate) .mud-icon-button::after {
 background-color: var(--av-check-color) !important;
 background-image: none !important;
}

/* Outlined + color modifiers — override --av-check-color */
.av-checkbox-outlined.av-checkbox-color-secondary .mud-checkbox:has(input:checked) .mud-icon-button,
.av-checkbox-outlined.av-checkbox-color-secondary .mud-checkbox:has(input:indeterminate) .mud-icon-button {
 --av-check-color: var(--color-secondary);
}
.av-checkbox-outlined.av-checkbox-color-info .mud-checkbox:has(input:checked) .mud-icon-button,
.av-checkbox-outlined.av-checkbox-color-info .mud-checkbox:has(input:indeterminate) .mud-icon-button {
 --av-check-color: var(--color-info);
}
.av-checkbox-outlined.av-checkbox-color-success .mud-checkbox:has(input:checked) .mud-icon-button,
.av-checkbox-outlined.av-checkbox-color-success .mud-checkbox:has(input:indeterminate) .mud-icon-button {
 --av-check-color: var(--color-success);
}
.av-checkbox-outlined.av-checkbox-color-warning .mud-checkbox:has(input:checked) .mud-icon-button,
.av-checkbox-outlined.av-checkbox-color-warning .mud-checkbox:has(input:indeterminate) .mud-icon-button {
 --av-check-color: var(--color-warning);
}
.av-checkbox-outlined.av-checkbox-color-error .mud-checkbox:has(input:checked) .mud-icon-button,
.av-checkbox-outlined.av-checkbox-color-error .mud-checkbox:has(input:indeterminate) .mud-icon-button {
 --av-check-color: var(--color-error);
}

/* Outlined + color → also override the border-color (which still inherits from base/color modifier) */
.av-checkbox-outlined.av-checkbox-color-secondary .mud-checkbox:has(input:checked) .mud-icon-button,
.av-checkbox-outlined.av-checkbox-color-secondary .mud-checkbox:has(input:indeterminate) .mud-icon-button {
 border-color: var(--color-secondary) !important;
}
.av-checkbox-outlined.av-checkbox-color-info .mud-checkbox:has(input:checked) .mud-icon-button,
.av-checkbox-outlined.av-checkbox-color-info .mud-checkbox:has(input:indeterminate) .mud-icon-button {
 border-color: var(--color-info) !important;
}
.av-checkbox-outlined.av-checkbox-color-success .mud-checkbox:has(input:checked) .mud-icon-button,
.av-checkbox-outlined.av-checkbox-color-success .mud-checkbox:has(input:indeterminate) .mud-icon-button {
 border-color: var(--color-success) !important;
}
.av-checkbox-outlined.av-checkbox-color-warning .mud-checkbox:has(input:checked) .mud-icon-button,
.av-checkbox-outlined.av-checkbox-color-warning .mud-checkbox:has(input:indeterminate) .mud-icon-button {
 border-color: var(--color-warning) !important;
}
.av-checkbox-outlined.av-checkbox-color-error .mud-checkbox:has(input:checked) .mud-icon-button,
.av-checkbox-outlined.av-checkbox-color-error .mud-checkbox:has(input:indeterminate) .mud-icon-button {
 border-color: var(--color-error) !important;
}

/* ===========================================================================
 §34 Av-Radio shape variants — Square / Outlined.
 Same composition rules as §33 — combine with §30 color modifiers.
 =========================================================================== */

/* --- Square — squared box + squared inner dot --- */
.av-radio-square .mud-radio .mud-icon-button {
 border-radius: var(--radius-sm) !important;
}
.av-radio-square .mud-radio:has(input:checked) .mud-icon-button::after {
 border-radius: 1px !important;
}

/* --- Outlined — transparent bg + colored dot --- */
.av-radio-outlined .mud-radio:has(input:checked) .mud-icon-button {
 background-color: transparent !important;
 --av-radio-dot-color: var(--color-primary-600);
}

html.dark .av-radio-outlined .mud-radio:has(input:checked) .mud-icon-button {
 --av-radio-dot-color: var(--color-primary-400);
}

.av-radio-outlined .mud-radio:has(input:checked) .mud-icon-button::after {
 background-color: var(--av-radio-dot-color) !important;
}

/* Outlined + color modifiers — override --av-radio-dot-color + border-color */
.av-radio-outlined.av-radio-color-secondary .mud-radio:has(input:checked) .mud-icon-button {
 --av-radio-dot-color: var(--color-secondary);
 border-color: var(--color-secondary) !important;
}
.av-radio-outlined.av-radio-color-info .mud-radio:has(input:checked) .mud-icon-button {
 --av-radio-dot-color: var(--color-info);
 border-color: var(--color-info) !important;
}
.av-radio-outlined.av-radio-color-success .mud-radio:has(input:checked) .mud-icon-button {
 --av-radio-dot-color: var(--color-success);
 border-color: var(--color-success) !important;
}
.av-radio-outlined.av-radio-color-warning .mud-radio:has(input:checked) .mud-icon-button {
 --av-radio-dot-color: var(--color-warning);
 border-color: var(--color-warning) !important;
}
.av-radio-outlined.av-radio-color-error .mud-radio:has(input:checked) .mud-icon-button {
 --av-radio-dot-color: var(--color-error);
 border-color: var(--color-error) !important;
}

/* --- Radio cards — Guía Visual RadioGroups pattern ---
 Replica del demo forms/radio/RadioGroups.jsx: cada MudRadio dentro del group
 se transforma en una card full-width, con bg gray-100 idle, bg primary-500 +
 text white cuando checked, + check icon SVG a la derecha. El círculo nativo
 del radio (.mud-icon-button) se oculta — la card entera es el indicador. */

.av-radio-cards-filled .mud-radio-group {
 display: flex;
 flex-direction: column;
 gap: 8px;
}

.av-radio-cards-filled .mud-radio {
 position: relative;
 display: flex !important;
 align-items: center;
 width: 100%;
 padding: 16px 56px 16px 20px !important; /* right padding = espacio para CheckIcon */
 border-radius: var(--radius-lg) !important;
 border: 1px solid var(--color-gray-300) !important;
 background-color: var(--color-gray-100) !important;
 cursor: pointer;
 transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
 margin: 0 !important;
}
html.dark .av-radio-cards-filled .mud-radio {
 background-color: var(--color-dark-600) !important;
 border-color: var(--color-dark-500) !important;
}

/* Checked state — full bg primary + border primary + texto blanco. */
.av-radio-cards-filled .mud-radio:has(input:checked) {
 background-color: var(--color-primary-500) !important;
 border-color: var(--color-primary-500) !important;
}
.av-radio-cards-filled .mud-radio:has(input:checked),
.av-radio-cards-filled .mud-radio:has(input:checked) * {
 color: var(--color-white) !important;
}

/* Focus ring leve (sustituto del active:ring de Guía Visual). */
.av-radio-cards-filled .mud-radio:focus-within {
 box-shadow: 0 0 0 2px rgb(from var(--color-primary-500) r g b / 0.50);
}

/* Ocultar el círculo nativo del radio — la card entera es el indicador. */
.av-radio-cards-filled .mud-radio .mud-icon-button {
 display: none !important;
}

/* Check icon a la derecha cuando checked — SVG inline replica Guía Visual CheckIcon
 (circle white/0.2 fill + check path white). */
.av-radio-cards-filled .mud-radio:has(input:checked)::after {
 content: '';
 position: absolute;
 right: 16px;
 top: 50%;
 transform: translateY(-50%);
 width: 24px;
 height: 24px;
 background-image: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'><circle cx='12' cy='12' r='12' fill='%23ffffff' opacity='0.2'/><path d='M7 13l3 3 7-7' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
 background-repeat: no-repeat;
 background-position: center;
 pointer-events: none;
}

/* ===========================================================================
 §35 Av-Avatar size scale extensions — xs / xl / xxl.
 MudAvatar natively supports Small/Medium/Large. These add the Guía Visual-style
 smaller xs and bigger xl / xxl. Apply additively:
 <MudAvatar Class="av-avatar-xxl">JD</MudAvatar>
 =========================================================================== */

.av-avatar-xs.mud-avatar {
 width: 24px !important;
 height: 24px !important;
 font-size: 10px !important;
}
.av-avatar-xs.mud-avatar .mud-icon-root {
 width: 14px;
 height: 14px;
 font-size: 14px;
}

.av-avatar-xl.mud-avatar {
 width: 64px !important;
 height: 64px !important;
 font-size: 20px !important;
}
.av-avatar-xl.mud-avatar .mud-icon-root {
 width: 32px;
 height: 32px;
 font-size: 32px;
}

.av-avatar-xxl.mud-avatar {
 width: 96px !important;
 height: 96px !important;
 font-size: 30px !important;
}
.av-avatar-xxl.mud-avatar .mud-icon-root {
 width: 48px;
 height: 48px;
 font-size: 48px;
}

/* ===========================================================================
 §36 Av-Popover — dropdown skin for MudSelect / MudAutocomplete popovers.
 MudBlazor renders Select/Autocomplete dropdowns via MudPopover (portaled).
 Apply opt-in via PopoverClass on the consumer:
 <MudSelect PopoverClass="av-popover" ...>
 The class lands on the .mud-popover element so compound selector works.
 Rows are .mud-list-item inside .mud-list inside the popover.
 =========================================================================== */

.av-popover.mud-popover {
 border-radius: var(--radius-md) !important;
 border: 1px solid var(--color-gray-200) !important;
 box-shadow:
 0 10px 25px -3px rgb(from var(--color-gray-900) r g b / 0.12),
 0 4px 10px -2px rgb(from var(--color-gray-900) r g b / 0.05) !important;
 overflow: hidden !important;
 padding: 4px 0 !important;
 background-color: var(--color-white) !important;
}

html.dark .av-popover.mud-popover {
 border-color: var(--color-dark-500) !important;
 background-color: var(--color-dark-750) !important;
 box-shadow:
 0 10px 25px -3px rgb(from var(--color-dark-900) r g b / 0.45),
 0 4px 10px -2px rgb(from var(--color-dark-900) r g b / 0.30) !important;
}

/* List inside the popover — neutralize Mud's default padding/divider */
.av-popover .mud-list {
 padding: 0 !important;
 background-color: transparent !important;
}

/* Each row */
.av-popover .mud-list-item {
 padding: 8px 16px !important;
 margin: 0 !important;
 border-radius: 0 !important;
 min-height: 0 !important;
 transition: background-color 120ms ease, color 120ms ease !important;
 cursor: pointer;
}

.av-popover .mud-list-item .mud-list-item-text {
 margin: 0 !important;
}

/* Hover (when not selected) */
.av-popover .mud-list-item:hover:not(.mud-selected-item):not(.mud-list-item-disabled) {
 background-color: var(--color-gray-100) !important;
}

html.dark .av-popover .mud-list-item:hover:not(.mud-selected-item):not(.mud-list-item-disabled) {
 background-color: var(--color-dark-600) !important;
}

/* Selected row */
.av-popover .mud-list-item.mud-selected-item {
 background-color: var(--color-primary-600) !important;
 color: var(--color-white) !important;
}

html.dark .av-popover .mud-list-item.mud-selected-item {
 background-color: var(--color-primary-500) !important;
}

.av-popover .mud-list-item.mud-selected-item .mud-typography,
.av-popover .mud-list-item.mud-selected-item .mud-list-item-text {
 color: var(--color-white) !important;
}

/* Disabled row */
.av-popover .mud-list-item.mud-list-item-disabled {
 opacity: 0.45;
 cursor: not-allowed;
}

/* ===========================================================================
 §37 Av-Calendar — calendar popover skin for MudDatePicker / MudDateRangePicker.
 Apply opt-in via PopoverClass:
 <MudDatePicker PopoverClass="av-calendar" ...>
 Targets the calendar grid + day cells + selected / today markers.
 =========================================================================== */

.av-calendar.mud-picker-popover-paper,
.av-calendar.mud-popover {
 border-radius: var(--radius-md) !important;
 border: 1px solid var(--color-gray-200) !important;
 box-shadow:
 0 10px 25px -3px rgb(from var(--color-gray-900) r g b / 0.12),
 0 4px 10px -2px rgb(from var(--color-gray-900) r g b / 0.05) !important;
 overflow: hidden !important;
 background-color: var(--color-white) !important;
}

html.dark .av-calendar.mud-picker-popover-paper,
html.dark .av-calendar.mud-popover {
 border-color: var(--color-dark-500) !important;
 background-color: var(--color-dark-750) !important;
}

/* Calendar header (month/year nav) */
.av-calendar .mud-picker-calendar-header {
 background-color: transparent !important;
 border-bottom: 1px solid var(--color-gray-100) !important;
 padding: 8px 12px !important;
}

html.dark .av-calendar .mud-picker-calendar-header {
 border-bottom-color: var(--color-dark-600) !important;
}

.av-calendar .mud-picker-calendar-header-transition {
 color: var(--color-gray-800) !important;
 font-weight: 600 !important;
}

html.dark .av-calendar .mud-picker-calendar-header-transition {
 color: var(--color-dark-100) !important;
}

/* Day-of-week row labels (Mo Tu We...) */
.av-calendar .mud-picker-calendar-day-of-week {
 color: var(--color-gray-500) !important;
 font-weight: 500;
 font-size: 11px;
 text-transform: uppercase;
 letter-spacing: 0.04em;
}

html.dark .av-calendar .mud-picker-calendar-day-of-week {
 color: var(--color-dark-300) !important;
}

/* Day cells */
.av-calendar .mud-picker-calendar-day {
 border-radius: 50% !important;
 transition: background-color 120ms ease, color 120ms ease !important;
 font-weight: 400;
}

/* Hover (not selected) */
.av-calendar .mud-picker-calendar-day:hover:not(.mud-picker-calendar-day-selected):not([disabled]) {
 background-color: var(--color-gray-100) !important;
 color: var(--color-gray-900) !important;
}

html.dark .av-calendar .mud-picker-calendar-day:hover:not(.mud-picker-calendar-day-selected):not([disabled]) {
 background-color: var(--color-dark-600) !important;
 color: var(--color-dark-50) !important;
}

/* Today marker (un-selected) */
.av-calendar .mud-current:not(.mud-picker-calendar-day-selected) {
 border: 1px solid var(--color-primary-600) !important;
 color: var(--color-primary-600) !important;
 font-weight: 600;
}

html.dark .av-calendar .mud-current:not(.mud-picker-calendar-day-selected) {
 border-color: var(--color-primary-400) !important;
 color: var(--color-primary-400) !important;
}

/* Selected day */
.av-calendar .mud-picker-calendar-day-selected,
.av-calendar .mud-picker-calendar-day.mud-button-filled-primary {
 background-color: var(--color-primary-600) !important;
 color: var(--color-white) !important;
 font-weight: 600;
}

html.dark .av-calendar .mud-picker-calendar-day-selected,
html.dark .av-calendar .mud-picker-calendar-day.mud-button-filled-primary {
 background-color: var(--color-primary-500) !important;
}

/* Range-picker — in-range days (between start and end) */
.av-calendar .mud-range-between {
 background-color: rgb(from var(--color-primary-600) r g b / 0.10) !important;
 color: var(--color-primary-700) !important;
 border-radius: 0 !important;
}

html.dark .av-calendar .mud-range-between {
 background-color: rgb(from var(--color-primary-400) r g b / 0.18) !important;
 color: var(--color-primary-300) !important;
}

/* Disabled day */
.av-calendar .mud-picker-calendar-day[disabled] {
 color: var(--color-gray-300) !important;
 cursor: not-allowed;
}

html.dark .av-calendar .mud-picker-calendar-day[disabled] {
 color: var(--color-dark-400) !important;
}

/* Footer actions (Cancel / OK) — keep visual consistent */
.av-calendar .mud-picker-actions {
 padding: 8px 12px !important;
 border-top: 1px solid var(--color-gray-100) !important;
}

html.dark .av-calendar .mud-picker-actions {
 border-top-color: var(--color-dark-600) !important;
}
/* ============================================================================
 * §38 ─── DataGrid chrome
 * ----------------------------------------------------------------------------
 * App-level skin for the datatable composition surfaces that wrap a MudTable
 * or MudDataGrid. This section skins everything AROUND the table:
 *
 * §38.1 .av-datagrid outer frame (replaces stripped
 * Mud border/shadow with the Guía Visual
 * Card look)
 * §38.2 .av-datagrid-toolbar top strip: title + actions + search
 * + filter chips
 * §38.3 .av-datagrid-view-menu dropdown body (column toggles +
 * variant switches)
 * §38.4 .av-datagrid-export-menu dropdown body (CSV in v1)
 * §38.5 .av-datagrid-selected-actions floating bar shown when selection
 * count > 0
 * §38.6 .av-datagrid-empty empty-state placeholder
 * §38.7 .av-datagrid-loading skeleton rows while data fetches
 * §38.8 @media print page-friendly layout (no toolbar,
 * no pagination, no sticky)
 *
 * Tokens consumed from design-tokens.css §J (--av-table-radius, --av-table-
 * chrome-pad-*, --av-table-chrome-gap). Colors from --color-gray-* /
 * --color-dark-* / --color-primary-* ramps — theme + brand aware.
 *
 * The class names use the `av-datagrid-*` BEM prefix even when hosting a
 * MudTable (not a MudDataGrid). Reason: the wrapping component is the
 * SHARED toolbar/view/export composition — same chrome regardless of which
 * Mud primitive the consumer chose inside. The doctrine names the chrome
 * once.
 * ========================================================================== */


/* §38.1 ─── Outer layout container ───────────────────────────────────────
 FLAT layout container — no card chrome, no background. Matches Guía Visual:
 toolbar sits directly on the page bg, and only the table itself carries
 the card look (border + radius — applied directly on .mud-table). The
 wrapper just stacks toolbar + table + selected-actions with consistent
 vertical rhythm. */
.av-datagrid {
 display: flex;
 flex-direction: column;
 gap: 16px;
}

/* Cell alignment (head + body) — scope-restringido a tablas que opten in:
 - .av-datagrid wrapper (AdvancedTable / AdvancedGrid showcases) — opt-in via wrapper.
 - .styled-table.av-cells-left — opt-in via class directo en el MudTable
 (TableShowcase Basic + cualquier tabla standalone que quiera el patrón).
 Las celdas marcadas explicitamente con .cell-center (columna Actions, etc.)
 preservan su centrado. La regla bate el auto-center :has(.mud-chip) /
 :has(.mud-icon-button) del styled-table base por especificidad (5,0) vs (3,0). */
.av-datagrid .styled-table .mud-table-head .mud-table-cell:not(.cell-center),
.av-datagrid .styled-table .mud-table-body .mud-table-cell:not(.cell-center),
.styled-table.av-cells-left .mud-table-head .mud-table-cell:not(.cell-center),
.styled-table.av-cells-left .mud-table-body .mud-table-cell:not(.cell-center) {
 text-align: left;
}

/* Bordered + Striped toggles (View menu) — los params Bordered/Striped de
 MudTable/MudDataGrid agregan .mud-table-bordered / .mud-table-striped. Las
 reglas nativas de Mud tienen especificidad (0,7,0) y usan colores casi
 invisibles sobre el styled-table; las batimos replicando la misma cadena de
 selectores + prefix .av-datagrid (sube a 0,8,0 / 0,9,0) con tokens del design
 system. Scope-restringido a .av-datagrid (los 2 showcases). */
.av-datagrid .styled-table.mud-table-bordered .mud-table-container .mud-table-root .mud-table-body .mud-table-row .mud-table-cell:not(:last-child) {
 border-right: 1px solid var(--color-gray-200);
}
html.dark .av-datagrid .styled-table.mud-table-bordered .mud-table-container .mud-table-root .mud-table-body .mud-table-row .mud-table-cell:not(:last-child) {
 border-right-color: var(--color-dark-600);
}

/* Striped — Mud pinta las CELDAS con bg surface opaco (.mud-table-cell), así que
 el striped hay que aplicarlo sobre las celdas (> .mud-table-cell) de las filas
 impares, no sobre la fila (que queda tapada por las celdas). Mud stripea las
 filas IMPARES (:nth-of-type(odd)). */
.av-datagrid .styled-table.mud-table-striped .mud-table-container .mud-table-root .mud-table-body .mud-table-row:nth-of-type(odd) > .mud-table-cell {
 background-color: var(--color-gray-100);
}
html.dark .av-datagrid .styled-table.mud-table-striped .mud-table-container .mud-table-root .mud-table-body .mud-table-row:nth-of-type(odd) > .mud-table-cell {
 background-color: var(--color-dark-800);
}


/* §38.2 ─── Toolbar (FLAT — no card chrome, sits directly on page bg) ──
 Guía Visual reference: <div class="table-toolbar"> is a raw flex column with
 NO bg, border, or padding-x. Only vertical rhythm (gap between title row
 and filter row). The horizontal page padding comes from the parent
 layout (.px-xs-0 .px-sm-3 .px-md-6 in MainLayout) — the toolbar inherits. */
.av-datagrid-toolbar {
 display: flex;
 flex-direction: column;
 gap: 12px;
 padding: 0;
 background: transparent;
 border: none;
}

/* Top row: title at left, action cluster at right. */
.av-datagrid-toolbar__top {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 16px;
 min-height: 32px;
}

/* Title — typography matches Guía Visual: 20 px / weight 500 / letter-spacing
 0.025em. Color is NOT overridden here — the `Color="Color.Primary"` prop
 on MudText paints it Avalme Blue (when brand=avalme) or the active
 primary tint, exactly like /dashboard-v1's hero greeting. Margin reset
 kills Mud's default vertical margin on h6/p elements. */
.av-datagrid-toolbar__title.mud-typography {
 font-size: 20px;
 font-weight: 500;
 line-height: 1.4;
 letter-spacing: 0.025em;
 margin: 0;
 padding: 0;
 flex: 1 1 auto;
 min-width: 0;
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}

/* Action cluster — right-aligned button group. Guía Visual reference uses h-8
 (32 px) for ALL toolbar action buttons (Print, Export, View). The "New X"
 CTA is the visual exception (filled, slightly taller). */
.av-datagrid-toolbar__actions {
 display: flex;
 align-items: center;
 gap: 8px;
 flex-shrink: 0;
}

/* Force all icon-buttons inside the toolbar action cluster to 32 px to match
 Guía Visual. MudIconButton's default size-small is 30 px square — close but
 we lock it for visual rhythm with the labeled buttons next to them. */
.av-datagrid-toolbar__actions .mud-icon-button-size-small {
 width: 32px;
 height: 32px;
}

/* The "New X" primary CTA — filled pill. Slightly taller than the secondary
 cluster (36 px vs 32 px) to read as the page's primary action. Guía Visual's
 reference doesn't show a New CTA in the Orders demo, but the AddLeadStatus
 canonical FormDialog uses the same 36 px pill pattern for primary actions. */
.av-datagrid-toolbar__cta {
 height: 36px;
 border-radius: 9999px;
 padding: 0 16px;
 font-weight: 500;
 text-transform: none;
}

/* Bottom row: search + filters at left, View menu at right. Guía Visual uses
 `overflow-x: auto` here so the filter strip survives on small viewports
 without wrapping awkwardly. */
.av-datagrid-toolbar__bottom {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 16px;
 flex-wrap: wrap;
 padding-bottom: 4px;
}

/* LEFT cluster of the bottom row — search + filter buttons + active chips. */
.av-datagrid-toolbar__filters-cluster {
 display: flex;
 align-items: center;
 gap: 8px;
 flex: 1 1 auto;
 min-width: 0;
}

/* RIGHT cluster of the bottom row — search + View button. Pinned a la derecha
 (justify-content space-between en el padre); search a la izquierda del View
 dentro del cluster. */
.av-datagrid-toolbar__view-cluster {
 display: flex;
 align-items: center;
 gap: 8px;
 flex-shrink: 0;
}

.av-datagrid-toolbar__search {
 width: 100%;
 max-width: 280px;
 flex: 0 1 280px;
 min-width: 200px;
}

/* Filter button — matches Guía Visual's "Status / Date Range / Total Amount"
 filter activator pattern: 32 px height, dashed border, labeled with text,
 small icon prefix. The dashed border is the visual signal of "click to
 apply a filter" (vs solid which means "click to perform an action"). */
.av-datagrid-toolbar__filter-btn.mud-button-root {
 height: 32px;
 padding: 0 10px;
 border-radius: 6px;
 border: 1px dashed var(--color-gray-300);
 background: transparent;
 color: var(--color-gray-800);
 font-size: 12px;
 font-weight: 500;
 text-transform: none;
 letter-spacing: 0;
 gap: 8px;
 white-space: nowrap;
}

.av-datagrid-toolbar__filter-btn.mud-button-root:hover {
 background: rgb(from var(--color-gray-300) r g b / 0.2);
}

/* Active state — the filter is currently applied. Switches the border to
 solid + primary tint, matching the way Guía Visual's chips highlight when
 selected. */
.av-datagrid-toolbar__filter-btn--active.mud-button-root {
 border-style: solid;
 border-color: var(--color-primary-600);
 color: var(--color-primary-700);
 background: rgb(from var(--color-primary-500) r g b / 0.08);
}

html.dark .av-datagrid-toolbar__filter-btn.mud-button-root {
 border-color: var(--color-dark-450);
 color: var(--color-dark-50);
}

html.dark .av-datagrid-toolbar__filter-btn.mud-button-root:hover {
 background: rgb(from var(--color-dark-300) r g b / 0.2);
}

html.dark .av-datagrid-toolbar__filter-btn--active.mud-button-root {
 border-color: var(--color-primary-400);
 color: var(--color-primary-300);
 background: rgb(from var(--color-primary-400) r g b / 0.16);
}

/* Filter pill (showcase Advanced Table/Grid) — MudButton Outlined Size.Small
 base ya provee el look idle. La clase .is-active modificadora (toggled desde
 el showcase via @* `_vipFilter ? "is-active" : ""` *@) pinta el active state
 con primary tint + border + text para señalizar que el filtro está aplicado. */
.av-datagrid-toolbar__chip.mud-button-root.is-active {
 border-color: var(--color-primary-600);
 color: var(--color-primary-700);
 background: rgb(from var(--color-primary-500) r g b / 0.08);
}

html.dark .av-datagrid-toolbar__chip.mud-button-root.is-active {
 border-color: var(--color-primary-400);
 color: var(--color-primary-300);
 background: rgb(from var(--color-primary-400) r g b / 0.16);
}

@media (max-width: 639px) {
 .av-datagrid-toolbar__search {
 max-width: none;
 }

 /* Mobile: action cluster collapses to an ellipsis menu (the razor wires
 a MudMenu with the same items). Hide the inline cluster below sm. */
 .av-datagrid-toolbar__actions--desktop {
 display: none;
 }
}

@media (min-width: 640px) {
 .av-datagrid-toolbar__actions--mobile {
 display: none;
 }
}

.av-datagrid-toolbar__filters {
 display: flex;
 flex-wrap: wrap;
 gap: 6px;
 align-items: center;
}


/* §38.3 ─── View menu — activator + drawer body bits ─────────────────────────
 The view menu pivoted from MudMenu (popover) to MudDrawer (right-anchored)
 per the canonical "Side panel drawers" doctrine (see ThemeCustomizerDrawer
 reference). The drawer chrome lives in design-tokens.css §11 (.bp-theme-
 drawer + helpers). Below we only style:
 - the activator BUTTON (Guía Visual "View" pill with caret)
 - the toggles LIST inside the drawer body (vertical stack of switches)
 - the column-checkbox LIST (scrollable when many columns) */

/* Activator button — labeled (icon + "View" text + caret). Override Mud's
 default ALL-CAPS button text so "View" reads natural case, and round
 corners so the button sits in the same visual family as the form-dialog
 action buttons. */
.av-datagrid-view-menu__activator.mud-button-root {
 height: 36px;
 padding: 0 14px;
 border-radius: 9999px;
 text-transform: none;
 font-weight: 500;
 font-size: 13px;
 letter-spacing: 0;
 border-color: var(--color-gray-300);
 color: var(--color-gray-700);
 background: transparent;
}

.av-datagrid-view-menu__activator.mud-button-root:hover {
 background: var(--color-gray-100);
 border-color: var(--color-gray-400);
 color: var(--color-gray-900);
}

html.dark .av-datagrid-view-menu__activator.mud-button-root {
 border-color: var(--color-dark-500);
 color: var(--color-dark-200);
}

html.dark .av-datagrid-view-menu__activator.mud-button-root:hover {
 background: var(--color-dark-600);
 border-color: var(--color-dark-400);
 color: var(--color-dark-50);
}

/* List wrapper inside a `.bp-theme-section` — vertical stack of rows.
 Mirror of `.dv1-customize-list` from the dashboard's Customize drawer
 (avalme-v1.css §9.10). */
.av-datagrid-view-menu__list {
 display: flex;
 flex-direction: column;
 gap: 4px;
 max-height: 40vh;
 overflow-y: auto;
 padding-right: 4px;
}

/* Row pattern — label LEFT, control RIGHT (switch or checkbox). Hovering
 tints the bg subtly so the user sees the click target. Mirror of
 `.dv1-customize-row` from the dashboard's Customize drawer. */
.av-datagrid-view-menu__row {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 12px;
 padding: 8px 10px;
 border-radius: 6px;
 cursor: pointer;
 transition: background-color 120ms ease;
}

.av-datagrid-view-menu__row:hover {
 background: var(--color-gray-100);
}

html.dark .av-datagrid-view-menu__row:hover {
 background: var(--color-dark-600);
}

/* Row label — same typography as `.dv1-customize-label`. Stays left-
 aligned and takes available space (`flex: 1`) so the switch/checkbox
 pins to the right edge. */
.av-datagrid-view-menu__row-label {
 font-family: var(--font-sans);
 font-size: var(--text-sm);
 font-weight: 500;
 color: var(--color-gray-800);
 flex: 1 1 auto;
 min-width: 0;
}

html.dark .av-datagrid-view-menu__row-label {
 color: var(--color-dark-100);
}

/* Section separator — three subtle dots centered, softer than a hairline
 rule. The dots use radial gradients on a transparent bg so they render
 crisp at any zoom level without needing extra DOM nodes. */
.av-datagrid-view-menu__dot-divider {
 margin: 8px auto;
 width: 32px;
 height: 4px;
 background-image: radial-gradient(circle, var(--color-gray-400) 1.5px, transparent 1.5px);
 background-size: 12px 4px;
 background-repeat: repeat-x;
 background-position: center;
 opacity: 0.6;
}

html.dark .av-datagrid-view-menu__dot-divider {
 background-image: radial-gradient(circle, var(--color-dark-300) 1.5px, transparent 1.5px);
 opacity: 0.5;
}


/* §38.4 ─── Export menu ──────────────────────────────────────────────────── */
.av-datagrid-export-menu {
 display: flex;
 flex-direction: column;
 min-width: 200px;
 padding: 4px;
}

.av-datagrid-export-menu__item {
 display: flex;
 align-items: center;
 gap: 10px;
 padding: 8px 12px;
 border-radius: 6px;
 cursor: pointer;
 color: var(--color-gray-700);
 font-size: var(--text-sm);
 transition: background-color 150ms ease;
}

.av-datagrid-export-menu__item:hover {
 background: var(--color-gray-100);
 color: var(--color-gray-900);
}

html.dark .av-datagrid-export-menu__item {
 color: var(--color-dark-200);
}

html.dark .av-datagrid-export-menu__item:hover {
 background: var(--color-dark-600);
 color: var(--color-dark-50);
}

.av-datagrid-export-menu__item-icon {
 flex-shrink: 0;
 color: var(--color-gray-500);
}

html.dark .av-datagrid-export-menu__item-icon {
 color: var(--color-dark-300);
}


/* §38.5 ─── Selected actions bar (visible when selection count > 0) ────────
 Floating snackbar-style bar anchored to the viewport (NOT to the table
 wrapper). Reason: with `position: sticky` inside the .av-datagrid the
 bar disappears once the user scrolls past the table — on long datasets
 the bulk-actions are invisible exactly when they're most useful. By
 pinning it to `position: fixed` at the bottom-RIGHT of the viewport,
 the bar stays visible as long as there's a selection, regardless of
 scroll position. Mirrors Guía Visual's reference floating action bar
 (bottom-right corner with generous offset from the page footer).
 `z-index: 1200` puts it above the Grid pager / table chrome but below
 MudBlazor modal dialogs (which typically use 1300+). */
/* COLOR DOCTRINE (matches Guía Visual reference):
 - Bar background: dark-gray (`--color-gray-800`) in light, light
 (`--color-dark-50`) in dark — the bar INVERTS the surface so it
 reads as a foreground floating panel.
 - Default button: neutral gray (gray-200 light / dark-600 dark) —
 for non-destructive bulk actions (Print, Export, More, …).
 - `--danger` button: error red — for destructive actions (Delete,
 Permanent remove, …).
 - `--warning` button: amber — for partially-destructive actions
 (Force logout, Lock, Suspend session, …).
 The class composition `.av-datagrid-selected-actions__btn` +
 `.av-datagrid-selected-actions__btn--danger` (or `--warning`) is the
 contract. NEVER tint the bar with primary or any other accent. */
.av-datagrid-selected-actions {
 position: fixed;
 bottom: 40px;
 right: 80px;
 z-index: 1200;
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 16px;
 padding: 10px 16px;
 min-width: 320px;
 max-width: min(640px, calc(100vw - 64px));
 border-radius: var(--av-table-radius);
 background: var(--color-gray-800);
 color: var(--color-gray-100);
 box-shadow:
 0 10px 25px rgb(from var(--color-gray-900) r g b / 0.35),
 0 4px 10px rgb(from var(--color-gray-900) r g b / 0.15);
 transform: translateY(0);
 opacity: 1;
 transition: transform 200ms ease, opacity 200ms ease;
}

html.dark .av-datagrid-selected-actions {
 background: var(--color-dark-50);
 color: var(--color-dark-900);
 box-shadow:
 0 10px 25px rgb(from var(--color-gray-900) r g b / 0.5),
 0 0 0 1px var(--color-dark-200);
}

/* Hidden state — slides DOWN slightly and fades. */
.av-datagrid-selected-actions--hidden {
 transform: translateY(20px);
 opacity: 0;
 pointer-events: none;
}

/* Mobile: full-width minus margins, anchored to the bottom edge with
 safe-area padding so it clears any browser bottom UI (iOS home bar). */
@media (max-width: 640px) {
 .av-datagrid-selected-actions {
 bottom: calc(16px + env(safe-area-inset-bottom, 0px));
 left: 16px;
 right: 16px;
 max-width: none;
 min-width: 0;
 transform: translateY(0);
 }
 .av-datagrid-selected-actions--hidden {
 transform: translateY(20px);
 }
}

.av-datagrid-selected-actions__count {
 font-size: var(--text-sm);
 font-weight: 500;
}

.av-datagrid-selected-actions__buttons {
 display: flex;
 gap: 8px;
}

/* Default button — neutral gray for non-destructive bulk actions
 (Print, Export, More, …). On the inverted dark-gray bar, a slightly
 lighter gray pill reads as a "muted" affordance — destructive
 actions must override with `--danger` or `--warning`. */
.av-datagrid-selected-actions__btn {
 display: inline-flex;
 align-items: center;
 gap: 6px;
 height: 32px;
 padding: 0 12px;
 border-radius: 6px;
 background: var(--color-gray-200);
 color: var(--color-gray-900);
 border: none;
 font-size: var(--text-sm);
 font-weight: 500;
 cursor: pointer;
 transition: background-color 150ms ease, color 150ms ease;
}

.av-datagrid-selected-actions__btn:hover {
 background: var(--color-gray-300);
}

html.dark .av-datagrid-selected-actions__btn {
 background: var(--color-dark-600);
 color: var(--color-dark-50);
}

html.dark .av-datagrid-selected-actions__btn:hover {
 background: var(--color-dark-500);
}

/* `--danger` — destructive actions (Delete, Permanent remove). Red
 error tint signals "this can't be undone". Same colors in dark since
 error red reads identically against the inverted dark-50 bar. */
.av-datagrid-selected-actions__btn--danger,
html.dark .av-datagrid-selected-actions__btn--danger {
 background: var(--color-error);
 color: var(--color-white);
}

.av-datagrid-selected-actions__btn--danger:hover,
html.dark .av-datagrid-selected-actions__btn--danger:hover {
 background: var(--color-error-darker);
 color: var(--color-white);
}

/* `--warning` — partially-destructive actions (Force logout, Lock,
 Suspend session). Amber signals "reversible but with impact". */
.av-datagrid-selected-actions__btn--warning,
html.dark .av-datagrid-selected-actions__btn--warning {
 background: var(--color-warning);
 color: var(--color-white);
}

.av-datagrid-selected-actions__btn--warning:hover,
html.dark .av-datagrid-selected-actions__btn--warning:hover {
 background: var(--color-warning-darker);
 color: var(--color-white);
}


/* §38.6 ─── Empty state ──────────────────────────────────────────────────── */
.av-datagrid-empty {
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 gap: 12px;
 padding: 64px 24px;
 text-align: center;
}

.av-datagrid-empty__icon {
 width: 56px;
 height: 56px;
 color: var(--color-gray-400);
}

html.dark .av-datagrid-empty__icon {
 color: var(--color-dark-300);
}

.av-datagrid-empty__title {
 font-family: var(--font-sans);
 font-size: 16px;
 font-weight: 600;
 color: var(--color-gray-700);
 margin: 0;
}

html.dark .av-datagrid-empty__title {
 color: var(--color-dark-100);
}

.av-datagrid-empty__hint {
 font-family: var(--font-sans);
 font-size: var(--text-sm);
 color: var(--color-gray-500);
 margin: 0;
 max-width: 320px;
}

html.dark .av-datagrid-empty__hint {
 color: var(--color-dark-300);
}


/* §38.7 ─── Loading state (skeleton rows) ────────────────────────────────── */
.av-datagrid-loading {
 display: flex;
 flex-direction: column;
}

.av-datagrid-loading__row {
 display: grid;
 grid-template-columns: var(--av-skeleton-cols, repeat(6, 1fr));
 gap: 16px;
 padding: var(--av-table-pad-y) var(--av-table-pad-x);
 border-bottom: 1px solid var(--color-gray-200);
}

html.dark .av-datagrid-loading__row {
 border-bottom-color: var(--color-dark-500);
}

.av-datagrid-loading__cell {
 height: 16px;
 border-radius: 4px;
 background: linear-gradient(
 90deg,
 var(--color-gray-100) 0%,
 var(--color-gray-200) 50%,
 var(--color-gray-100) 100%
 );
 background-size: 200% 100%;
 animation: avDatagridShimmer 1.4s ease-in-out infinite;
}

html.dark .av-datagrid-loading__cell {
 background: linear-gradient(
 90deg,
 var(--color-dark-600) 0%,
 var(--color-dark-500) 50%,
 var(--color-dark-600) 100%
 );
 background-size: 200% 100%;
}

@keyframes avDatagridShimmer {
 0% { background-position: 200% 0; }
 100% { background-position: -200% 0; }
}


/* §38.8 ─── Print styles ─────────────────────────────────────────────────── */
@media print {
 /* Hide everything that isn't the table itself. */
 .mud-appbar,
 .mud-drawer,
 .av-appbar,
 .av-nav-rail,
 .av-datagrid-toolbar,
 .mud-table-pagination,
 .av-datagrid-selected-actions,
 .av-datagrid-loading,
 .mud-snackbar-container,
 .mud-overlay,
 button,
 .mud-button-root,
 .mud-icon-button {
 display: none !important;
 }

 /* Reset page chrome — let the table flow full width. */
 body,
 .mud-main-content,
 .mud-page-content,
 .av-datagrid {
 background: white !important;
 margin: 0 !important;
 padding: 0 !important;
 box-shadow: none !important;
 border: none !important;
 border-radius: 0 !important;
 overflow: visible !important;
 }

 .av-datagrid--fullscreen {
 position: static !important;
 }

 /* Tables — neutralize hover/zebra/selected so each row reads as data only. */
 .mud-table,
 .styled-table.mud-table {
 background: transparent !important;
 }

 .mud-table-body .mud-table-row:hover:not(.mud-selected-item),
 .styled-table .mud-table-body .mud-table-row:hover:not(.mud-selected-item) {
 background: transparent !important;
 }

 .mud-table-body .mud-table-row.mud-selected-item::after,
 .styled-table .mud-table-body .mud-table-row.mud-selected-item::after {
 content: none !important;
 }

 .mud-table-striped .mud-table-body .mud-table-row:nth-of-type(even) > td,
 .styled-table.mud-table-striped .mud-table-body .mud-table-row:nth-of-type(even) > td {
 background: transparent !important;
 }

 /* Sticky head doesn't make sense in print — let it flow inline. */
 .mud-table-sticky-header .mud-table-head .mud-table-cell,
 .styled-table.mud-table-sticky-header .mud-table-head .mud-table-cell {
 position: static !important;
 box-shadow: none !important;
 }

 /* Avoid row splits across page boundaries. */
 .mud-table-row {
 break-inside: avoid;
 page-break-inside: avoid;
 }

 /* Header bg printed (even with most browsers stripping bg colors by default
 unless `print-color-adjust: exact`) so the column band stays readable. */
 .mud-table-head .mud-table-cell,
 .styled-table .mud-table-head .mud-table-cell {
 background: var(--color-gray-200) !important;
 color: var(--color-gray-800) !important;
 -webkit-print-color-adjust: exact;
 print-color-adjust: exact;
 }
}


/* §38.9 ─── DataGrid utility classes (independent of .styled-table)
 ----------------------------------------------------------------------------
 Small rules consumed by the pilots in /identity/users-Guía Visual-* and by future
 datatable pages. They EXIST as global utilities (not scoped to .styled-table)
 so MudDataGrid pages — which don't carry the legacy class — can still use
 them. Mirror equivalents under .styled-table already exist in avalme.css for
 the 42 legacy pages; both paths read the same value. */

/* MudDataGrid PropertyColumn headers default to text-align inherit which can
 center via parent flex layout. Force left-align under .av-datagrid scope
 so Name/Email/etc. headers align with their cell content. The cell-center
 modifier (below) wins for explicit-opt-in columns (Actions). */
.av-datagrid .mud-data-grid-header-cell {
 text-align: left;
}

/* Cell content centering — header AND body. The :has() / explicit-class
 pair mirrors avalme.css §669-717 but without the .styled-table parent. */
.mud-table-cell.cell-center,
.mud-data-grid-header-cell.cell-center {
 text-align: center;
}

.mud-table-cell.cell-center > *,
.mud-data-grid-header-cell.cell-center > * {
 margin-left: auto;
 margin-right: auto;
}

/* Row-action button clusters centered horizontally inside their cell. */
.mud-table-cell .row-actions,
.mud-table-cell .tenant-actions {
 display: flex;
 align-items: center;
 justify-content: center;
 gap: 4px;
}

/* Presence dot — extracted from the legacy Users.razor inline style so the
 pilots can render online/offline indicators without redefining the class.
 The legacy page keeps its inline copy for now; both definitions match. */
.users-online-dot {
 width: 10px;
 height: 10px;
 border-radius: 50%;
 background-color: var(--color-gray-400);
 display: inline-block;
 transition: all 0.3s ease;
}

.users-online-dot--active {
 background-color: var(--color-success, #25C16F);
 box-shadow: 0 0 0 3px rgb(from var(--color-success, #25C16F) r g b / 0.20);
 animation: usersPresencePulse 2s infinite;
}

@keyframes usersPresencePulse {
 0% { box-shadow: 0 0 0 0 rgb(from var(--color-success, #25C16F) r g b / 0.40); }
 70% { box-shadow: 0 0 0 6px rgb(from var(--color-success, #25C16F) r g b / 0); }
 100% { box-shadow: 0 0 0 0 rgb(from var(--color-success, #25C16F) r g b / 0); }
}


/* §38.10 ─── User cell (name column with avatar + name + meta, flat layout)
 ----------------------------------------------------------------------------
 Replaces the legacy <PersonCard> component (a MudCard wrapper with shadow
 + padding) in datagrid name columns. Renders as a flat 2-line block: bold
 name on top, muted meta line below — same vertical rhythm as Guía Visual's
 user-list rows. Avatar is a 36 px circle on the left. */

.user-cell {
 display: flex;
 align-items: center;
 gap: 12px;
 min-width: 0; /* allows the text column to truncate inside flex */
}

/* Avatar — Guía Visual "squircle" shape (superellipse / iOS-style rounded
 square). Implemented via `mask-image` with an inline SVG path so the
 shape is mathematically a squircle (smoother corner transition than
 `border-radius`). Same technique as Guía Visual's `mask is-squircle`
 utility. The mask clips the `<img>` itself — no wrapper needed.
 `border-radius: 0` is explicit so any inherited radius from MudBlazor
 or browser defaults doesn't compete with the mask. */
.user-cell__avatar {
 width: 36px;
 height: 36px;
 border-radius: 0;
 object-fit: cover;
 flex-shrink: 0;
 -webkit-mask-image: var(--av-squircle-mask);
 mask-image: var(--av-squircle-mask);
 -webkit-mask-size: contain;
 mask-size: contain;
 -webkit-mask-position: center;
 mask-position: center;
 -webkit-mask-repeat: no-repeat;
 mask-repeat: no-repeat;
 background-color: var(--color-gray-200); /* placeholder before image loads */
}

html.dark .user-cell__avatar {
 background-color: var(--color-dark-600);
}

.user-cell__text {
 display: flex;
 flex-direction: column;
 gap: 0;
 min-width: 0;
}

.user-cell__name {
 font-family: var(--font-sans);
 font-size: 14px;
 font-weight: 500;
 line-height: 1.3;
 color: var(--color-gray-800);
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
}

html.dark .user-cell__name {
 color: var(--color-dark-100);
}

.user-cell__meta {
 font-family: var(--font-sans);
 font-size: 12px;
 line-height: 1.3;
 color: var(--color-gray-500);
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
}

html.dark .user-cell__meta {
 color: var(--color-dark-300);
}


/* §38.11 ─── Tag / Badge variants (table cell chips) ─────────────────────
 FUTURE-USE library — not currently applied to any datatable cell, but
 pre-built so a future column like "Status: Shipping / Processing /
 Pending", "Role: Author", "Visibility: Draft / Published", or a tag
 list can drop in the canonical Guía Visual look without inventing styles.

 Composition: `.av-tag` is the base. Always combine with EXACTLY ONE
 variant modifier (`--filled` / `--outlined` / `--soft`) AND ONE color
 modifier (`--primary` / `--info` / `--success` / `--warning` /
 `--error`). The `--pill` modifier is OPTIONAL — adds full pill
 (border-radius: 9999px); without it the chip uses our 4 px radius.

 Mirrors Guía Visual's `tag` and `badge` utility classes which share the
 same shape but differ only in radius:
 - Default radius (4 px) ≈ Guía Visual's `.tag`
 - With `--pill` ≈ Guía Visual's `.badge.rounded-full`

 Color tokens are wired through a `--this-*` indirection so the same
 3 variants × 5 colors = 15 combinations are generated from 8 rules. */
.av-tag {
 /* Default neutral palette — overridden by color modifier classes. */
 --this-color: var(--color-gray-700);
 --this-color-dark: var(--color-gray-800);
 --this-bg: var(--color-gray-600);
 --this-bg-hover: var(--color-gray-700);

 display: inline-flex;
 align-items: center;
 gap: 6px;
 height: 22px;
 padding: 0 10px;
 font-family: var(--font-sans);
 font-size: 12px;
 font-weight: 500;
 line-height: 1;
 letter-spacing: 0;
 white-space: nowrap;
 flex-shrink: 0;
 border: 1px solid transparent;
 border-radius: 4px;
 background: transparent;
 color: var(--this-color);
}

/* Pill modifier — full rounded ends. Apply ON TOP of a variant. */
.av-tag--pill {
 border-radius: 9999px;
}

/* ── Color modifiers (set the --this-* CSS variables only) ─────────── */
.av-tag--primary {
 --this-color: var(--color-primary-600);
 --this-color-dark: var(--color-primary-700);
 --this-bg: var(--color-primary-600);
 --this-bg-hover: var(--color-primary-700);
}
.av-tag--info {
 --this-color: var(--color-info);
 --this-color-dark: var(--color-info-darker, var(--color-info));
 --this-bg: var(--color-info);
 --this-bg-hover: var(--color-info-darker, var(--color-info));
}
.av-tag--success {
 --this-color: var(--color-success);
 --this-color-dark: var(--color-success-darker, var(--color-success));
 --this-bg: var(--color-success);
 --this-bg-hover: var(--color-success-darker, var(--color-success));
}
.av-tag--warning {
 --this-color: var(--color-warning);
 --this-color-dark: var(--color-warning-darker);
 --this-bg: var(--color-warning);
 --this-bg-hover: var(--color-warning-darker);
}
.av-tag--error {
 --this-color: var(--color-error);
 --this-color-dark: var(--color-error-darker);
 --this-bg: var(--color-error);
 --this-bg-hover: var(--color-error-darker);
}

/* ── Variant: --filled (solid color, white text). Reference: the
 "Shipping" button. Used for high-contrast status pills that are
 the primary signal in their cell. */
.av-tag--filled {
 background: var(--this-bg);
 border-color: var(--this-bg);
 color: var(--color-white);
}
.av-tag--filled:hover {
 background: var(--this-bg-hover);
 border-color: var(--this-bg-hover);
}

/* ── Variant: --outlined (transparent bg, colored border at 30 %
 alpha, colored text). Reference: the "Author" badge. Used for
 medium-weight labels (roles, visibility, taxonomy). */
.av-tag--outlined {
 background: transparent;
 border-color: rgb(from var(--this-color) r g b / 0.3);
 color: var(--this-color);
}

html.dark .av-tag--outlined {
 /* Slightly lighter border + text in dark for legibility against
 the dark surface. */
 border-color: rgb(from var(--this-color) r g b / 0.4);
}

/* ── Variant: --soft (translucent bg at 7 % alpha, darker text).
 Reference: the "virtual-reality" badge. Used for low-weight tags
 that read as "annotation, not status" (categories, taxonomy). */
.av-tag--soft {
 background: rgb(from var(--this-bg) r g b / 0.07);
 border-color: rgb(from var(--this-bg) r g b / 0.10);
 color: var(--this-color-dark);
}

html.dark .av-tag--soft {
 background: rgb(from var(--this-bg) r g b / 0.18);
 color: var(--this-color);
}

/* Icon inside a tag — common pattern (truck for shipping, document
 for draft, etc.). Sized to match the 12 px text. */
.av-tag .mud-icon-root,
.av-tag svg {
 width: 14px;
 height: 14px;
 flex-shrink: 0;
}


/* §38.12 ─── Avatar variants (table cell + future use) ───────────────────
 Layered approach: `.av-avatar` is a fixed-size box, each variant
 defines the shape (circle / squircle / rounded / dashed-halo). The
 `.user-cell__avatar` from §38.10 is a specialized 36 × 36 squircle —
 for ALL other "image in a cell" needs (course tiles, logo cells,
 non-person rows), pick the matching `.av-avatar--*` variant below
 so the table doesn't accumulate per-page avatar styles.

 FUTURE-USE — not currently applied to any cell. The variants exist
 so the doctrine has a documented answer when a designer asks
 "what shape for THIS avatar?". */
.av-avatar {
 display: inline-block;
 flex-shrink: 0;
 width: 36px;
 height: 36px;
 object-fit: cover;
 background-color: var(--color-gray-200);
}

html.dark .av-avatar {
 background-color: var(--color-dark-600);
}

/* Squircle — DEFAULT for person rows (see .user-cell__avatar §38.10).
 Reference: the "Larine Burgher" avatar. Use for "this is a USER /
 contact / employee" — soft-corner shape matches the iOS / Guía Visual
 reference. */
.av-avatar--squircle {
 border-radius: 0;
 -webkit-mask-image: var(--av-squircle-mask);
 mask-image: var(--av-squircle-mask);
 -webkit-mask-size: contain;
 mask-size: contain;
 -webkit-mask-position: center;
 mask-position: center;
 -webkit-mask-repeat: no-repeat;
 mask-repeat: no-repeat;
}

/* Full circle — use for borrower / contact thumbnails when the row
 visually reads as "person profile, not data card" (e.g. a chat
 list, an inline mention chip). */
.av-avatar--circle {
 border-radius: 50%;
}

/* Rounded card — 8 px radius. Use for NON-PERSON images: product /
 course tiles, brand logos, document thumbnails. Reference: the
 "course-9" image. The 8 px matches `--av-table-radius` so card
 cells align with the frame's corner softness. */
.av-avatar--rounded {
 border-radius: var(--av-table-radius);
}

/* Initials fallback — when there's no image, render the user's
 initials inside a same-shape box. Reference: the "HS" example.
 Apply alongside a shape modifier (squircle / circle / rounded).
 Use a <span> or <div> instead of <img>; the bg color shows the
 initials. */
.av-avatar--initials {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 user-select: none;
 font-family: var(--font-sans);
 font-size: 13px;
 font-weight: 500;
 line-height: 1;
 text-transform: uppercase;
 color: var(--color-gray-700);
}

html.dark .av-avatar--initials {
 color: var(--color-dark-100);
}

/* Halo-on-hover — outer wrapper that shows a dashed border around
 the avatar when the parent ROW is hovered. Reference: the
 "Chiquita Flament" wrapper. Use sparingly — the effect competes
 with row-hover bg, so reserve it for tables where the avatar is
 the primary identifier (CRM contacts, member lists).

 Composition: wrap the inner avatar with .av-avatar--halo. The row
 that contains it must set the parent selector — `.mud-table-row`
 for MudTable, `.mud-data-grid .mud-table-row` for MudDataGrid.
 The dashed border is transparent by default and tints on row hover. */
.av-avatar--halo {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 border-radius: inherit;
 padding: 2px;
 border: 2px dashed transparent;
 transition: border-color 150ms ease;
}

.mud-table-row:hover .av-avatar--halo,
.mud-data-grid .mud-table-row:hover .av-avatar--halo {
 border-color: var(--color-gray-400);
}

html.dark .mud-table-row:hover .av-avatar--halo,
html.dark .mud-data-grid .mud-table-row:hover .av-avatar--halo {
 border-color: var(--color-dark-300);
}



/* ============================================================================
 * §39 ─── Av-DataGrid Pager (custom HTML pager for MudDataGrid)
 * ----------------------------------------------------------------------------
 * The custom pager replaces MudDataGridPager — see AdvancedGridShowcase.razor
 * PagerContent for markup. All selectors scope-restricted to .av-datagrid-pager*
 * — fully opt-in.
 * ============================================================================ */
/* ── 11.5. MudDataGrid pager — custom HTML pager ─────────────────────────
 Background: rounds of CSS reorder hacks (`order:`, `display: contents`,
 `position: absolute`) on MudDataGridPager's DOM failed to produce a
 stable 3-column layout for the Grid pilot. The cause was MudDataGrid's
 internal pager renders its children in a structure that doesn't fully
 honour our `.mud-data-grid`-scoped overrides — even with `!important`
 on every property.

 Resolution: replace `<MudDataGridPager>` entirely with a hand-written
 pager in `<PagerContent>` (see consumer pages §PagerContent).
 The custom markup uses our own `.av-datagrid-pager*` class hierarchy
 and is in the exact DOM order we want — info-left, buttons-center,
 rows-per-page-right. No `order:` CSS, no DOM dissolution tricks.

 The Table pilot keeps using MudTablePager (its DOM cooperates with
 our §10 rules), so nothing here affects the Table — there's NO
 `.mud-table-pagination`/`.mud-table-pagination-toolbar` selector in
 this section. */
.av-datagrid-pager {
 display: flex;
 align-items: center;
 gap: 12px;
 padding: 8px 16px;
 min-height: 48px;
 border-top: 1px solid var(--color-primary-200);
 background: linear-gradient(
 180deg,
 rgb(from var(--color-primary-500) r g b / 0.04) 0%,
 var(--color-gray-50) 100%
 );
 color: var(--color-gray-700);
 font-size: 0.8125rem;
}

html.dark .av-datagrid-pager {
 border-top-color: var(--color-primary-700);
 background: linear-gradient(
 180deg,
 rgb(from var(--color-primary-500) r g b / 0.10) 0%,
 var(--color-dark-700) 100%
 );
 color: var(--color-dark-200);
}

/* Left: page range info "1-10 │ 233". Primary-tinted + bold so it
 stands out as the most informative chunk of the pager. */
.av-datagrid-pager__info {
 display: flex;
 align-items: center;
 gap: 6px;
 margin-right: auto;
 color: var(--color-primary-700);
 font-weight: 600;
 font-variant-numeric: tabular-nums;
}

html.dark .av-datagrid-pager__info {
 color: var(--color-primary-300);
}

.av-datagrid-pager__separator {
 color: var(--color-gray-400);
 font-weight: 400;
}

html.dark .av-datagrid-pager__separator {
 color: var(--color-dark-400);
}

/* Center: nav buttons (first / prev / next / last). 32×32 square-
 rounded with subtle border; hover tints with primary. Mirrors
 §10's `.mud-table-pagination-actions` skin so both pagers look
 identical. */
.av-datagrid-pager__nav {
 display: flex;
 gap: 4px;
 margin-right: auto;
}

.av-datagrid-pager__btn {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 width: 32px;
 height: 32px;
 padding: 0;
 border: 1px solid var(--color-gray-300);
 background: var(--color-white);
 color: var(--color-gray-600);
 border-radius: 6px;
 cursor: pointer;
 transition: all 0.2s ease;
}

.av-datagrid-pager__btn:hover:not(:disabled) {
 background: rgb(from var(--color-primary-500) r g b / 0.08);
 border-color: var(--color-primary-500);
 color: var(--color-primary-700);
}

.av-datagrid-pager__btn:disabled {
 opacity: 0.4;
 cursor: not-allowed;
}

html.dark .av-datagrid-pager__btn {
 border-color: var(--color-dark-500);
 background: var(--color-dark-700);
 color: var(--color-dark-200);
}

html.dark .av-datagrid-pager__btn:hover:not(:disabled) {
 background: rgb(from var(--color-primary-500) r g b / 0.18);
 border-color: var(--color-primary-400);
 color: var(--color-primary-200);
}

/* Right: "Rows per page:" label + native <select>. */
.av-datagrid-pager__rows {
 display: flex;
 align-items: center;
 gap: 8px;
}

.av-datagrid-pager__rows-label {
 color: var(--color-gray-700);
 font-weight: 500;
}

html.dark .av-datagrid-pager__rows-label {
 color: var(--color-dark-200);
}

/* Native <select> styled minimally — no border / no background /
 no underline, just the value + the OS-default chevron. */
.av-datagrid-pager__rows-select {
 border: none;
 background: transparent;
 box-shadow: none;
 font-size: 0.8125rem;
 color: var(--color-gray-800);
 cursor: pointer;
 padding: 2px 4px;
 min-width: 56px;
 appearance: auto;
}

html.dark .av-datagrid-pager__rows-select {
 color: var(--color-dark-100);
}

.av-datagrid-pager__rows-select:focus {
 outline: 2px solid var(--color-primary-500);
 outline-offset: 1px;
 border-radius: 4px;
}

/* Mobile: stack vertically. */
@media (max-width: 640px) {
 .av-datagrid-pager {
 flex-direction: column;
 align-items: stretch;
 gap: 12px;
 }
 .av-datagrid-pager__info,
 .av-datagrid-pager__nav {
 margin-right: 0;
 justify-content: center;
 }
}


/* ============================================================================
 * §40 ─── Av-Alert — Basic + Soft skins (opt-in) — Guía Visual color matrix completa
 * ----------------------------------------------------------------------------
 * Mud's Severity enum tiene 4 colors (Info/Success/Warning/Error) + Normal.
 * Guía Visual Basic alert muestra 7 colors (default/primary/secondary/info/success/
 * warning/error). Para cubrir las 7, usamos el color chain av-color-X (§14.1 ext,
 * compartido con button/badge/tag) que setea --av-this según el color.
 *
 * Skins:
 * .av-alert-basic — bg saturado --av-this + text white + rounded-lg + padding
 * Sin av-color-X → cae a neutral (gray-200 + gray-800).
 * Aplicación: <MudAlert Class="av-alert-basic av-color-X"
 * Severity="Severity.Normal" NoIcon="true" />
 * (Para info/success/warning/error puede mantener Severity
 * correspondiente para que el icon se renderee acorde.)
 *
 * .av-alert-soft — bg tinted 10% --av-this/--mud-palette + text darker.
 * Replica Guía Visual SoftColor. Mantiene Severity para color.
 * Aplicación: <MudAlert Class="av-alert-soft" Severity="X" />
 * ============================================================================ */

/* — av-alert-basic — 7 colors saturated (Guía Visual Basic) — */

.av-alert-basic.mud-alert {
 border-radius: var(--radius-lg) !important; /* Guía Visual rounded-lg = 8 px */
 padding: 16px !important; /* Guía Visual py-4 px-4 = 16 px */
 border: 0 !important;
 background-color: var(--color-gray-200) !important;
 color: var(--color-gray-800) !important;
}
.av-alert-basic.mud-alert .mud-alert-icon {
 color: var(--color-gray-800) !important;
}
html.dark .av-alert-basic.mud-alert {
 background-color: var(--color-dark-500) !important;
 color: var(--color-dark-100) !important;
}
html.dark .av-alert-basic.mud-alert .mud-alert-icon {
 color: var(--color-dark-100) !important;
}

@media (min-width: 640px) {
 .av-alert-basic.mud-alert {
 padding: 16px 20px !important; /* Guía Visual sm:px-5 = 20 px lateral */
 }
}

/* Mud's .mud-alert-message tiene padding: 9px 0 + .mud-alert-icon tiene
 padding: 7px 0 internamente. Sumados a nuestro outer 16 px hacen 25 px cada
 lado, demasiado alto vs Guía Visual 16 px. Override a 0 para que el outer sea
 la única fuente de padding vertical (pixel-perfect Guía Visual py-4).
 Font-size: Guía Visual body default = --text-sm-plus (15 px / 0.9375rem); Mud
 alert hereda body1 = --text-sm (14 px). Override explícito para matchear. */
.av-alert-basic.mud-alert .mud-alert-message {
 padding: 0 !important;
 font-size: var(--text-sm-plus) !important;
 line-height: 1.5 !important;
}
.av-alert-basic.mud-alert .mud-alert-icon {
 padding: 0 !important;
 /* Alinear icono visualmente con el texto cuando es single-line. */
 align-self: center;
}

/* Saturated color variants — consume --av-this del color chain av-color-X.
   html.dark counterpart REQUERIDO: la regla `html.dark .av-alert-basic.mud-alert`
   (neutral) tiene specificity (0,3,1) y gana sobre `.av-alert-basic.mud-alert[class*="av-color-"]`
   (0,3,0). Sin esta contraparte dark, en dark mode todos los colored caen al bg neutral. */
.av-alert-basic.mud-alert[class*="av-color-"],
html.dark .av-alert-basic.mud-alert[class*="av-color-"] {
 background-color: var(--av-this) !important;
 color: var(--color-white) !important;
}
.av-alert-basic.mud-alert[class*="av-color-"] .mud-alert-icon,
.av-alert-basic.mud-alert[class*="av-color-"] .mud-alert-message,
html.dark .av-alert-basic.mud-alert[class*="av-color-"] .mud-alert-icon,
html.dark .av-alert-basic.mud-alert[class*="av-color-"] .mud-alert-message {
 color: var(--color-white) !important;
}

/* — av-alert-soft — Guía Visual SoftColor — */

.av-alert-soft.mud-alert {
 border-radius: var(--radius-lg) !important; /* Guía Visual rounded-lg = 8 px */
 padding: 16px !important;
 border: 0 !important;
}

@media (min-width: 640px) {
 .av-alert-soft.mud-alert {
 padding: 16px 20px !important;
 }
}

/* Override Mud inner padding + font-size — pixel-perfect Guía Visual py-4 +
 text-sm-plus (15 px) en vez de Mud body1 14 px. */
.av-alert-soft.mud-alert .mud-alert-message {
 padding: 0 !important;
 font-size: var(--text-sm-plus) !important;
 line-height: 1.5 !important;
}
.av-alert-soft.mud-alert .mud-alert-icon {
 padding: 0 !important;
 align-self: center;
}

/* Info */
.av-alert-soft.mud-alert.mud-alert-filled-info,
.av-alert-soft.mud-alert.mud-alert-outlined-info,
.av-alert-soft.mud-alert.mud-alert-text-info {
 background-color: rgb(from var(--color-info) r g b / 0.10) !important;
 color: var(--color-info-darker) !important;
}
.av-alert-soft.mud-alert.mud-alert-filled-info .mud-alert-icon,
.av-alert-soft.mud-alert.mud-alert-outlined-info .mud-alert-icon,
.av-alert-soft.mud-alert.mud-alert-text-info .mud-alert-icon {
 color: var(--color-info-darker) !important;
}
html.dark .av-alert-soft.mud-alert.mud-alert-filled-info,
html.dark .av-alert-soft.mud-alert.mud-alert-outlined-info,
html.dark .av-alert-soft.mud-alert.mud-alert-text-info {
 background-color: rgb(from var(--color-info-light) r g b / 0.14) !important;
 color: var(--color-info-light) !important;
}
html.dark .av-alert-soft.mud-alert.mud-alert-filled-info .mud-alert-icon,
html.dark .av-alert-soft.mud-alert.mud-alert-outlined-info .mud-alert-icon,
html.dark .av-alert-soft.mud-alert.mud-alert-text-info .mud-alert-icon {
 color: var(--color-info-light) !important;
}

/* Success */
.av-alert-soft.mud-alert.mud-alert-filled-success,
.av-alert-soft.mud-alert.mud-alert-outlined-success,
.av-alert-soft.mud-alert.mud-alert-text-success {
 background-color: rgb(from var(--color-success) r g b / 0.12) !important;
 color: var(--color-success-darker) !important;
}
.av-alert-soft.mud-alert.mud-alert-filled-success .mud-alert-icon,
.av-alert-soft.mud-alert.mud-alert-outlined-success .mud-alert-icon,
.av-alert-soft.mud-alert.mud-alert-text-success .mud-alert-icon {
 color: var(--color-success-darker) !important;
}
html.dark .av-alert-soft.mud-alert.mud-alert-filled-success,
html.dark .av-alert-soft.mud-alert.mud-alert-outlined-success,
html.dark .av-alert-soft.mud-alert.mud-alert-text-success {
 background-color: rgb(from var(--color-success-light) r g b / 0.18) !important;
 color: var(--color-success-light) !important;
}
html.dark .av-alert-soft.mud-alert.mud-alert-filled-success .mud-alert-icon,
html.dark .av-alert-soft.mud-alert.mud-alert-outlined-success .mud-alert-icon,
html.dark .av-alert-soft.mud-alert.mud-alert-text-success .mud-alert-icon {
 color: var(--color-success-light) !important;
}

/* Warning */
.av-alert-soft.mud-alert.mud-alert-filled-warning,
.av-alert-soft.mud-alert.mud-alert-outlined-warning,
.av-alert-soft.mud-alert.mud-alert-text-warning {
 background-color: rgb(from var(--color-warning) r g b / 0.14) !important;
 color: var(--color-warning-darker) !important;
}
.av-alert-soft.mud-alert.mud-alert-filled-warning .mud-alert-icon,
.av-alert-soft.mud-alert.mud-alert-outlined-warning .mud-alert-icon,
.av-alert-soft.mud-alert.mud-alert-text-warning .mud-alert-icon {
 color: var(--color-warning-darker) !important;
}
html.dark .av-alert-soft.mud-alert.mud-alert-filled-warning,
html.dark .av-alert-soft.mud-alert.mud-alert-outlined-warning,
html.dark .av-alert-soft.mud-alert.mud-alert-text-warning {
 background-color: rgb(from var(--color-warning-light) r g b / 0.18) !important;
 color: var(--color-warning-light) !important;
}
html.dark .av-alert-soft.mud-alert.mud-alert-filled-warning .mud-alert-icon,
html.dark .av-alert-soft.mud-alert.mud-alert-outlined-warning .mud-alert-icon,
html.dark .av-alert-soft.mud-alert.mud-alert-text-warning .mud-alert-icon {
 color: var(--color-warning-light) !important;
}

/* Error */
.av-alert-soft.mud-alert.mud-alert-filled-error,
.av-alert-soft.mud-alert.mud-alert-outlined-error,
.av-alert-soft.mud-alert.mud-alert-text-error {
 background-color: rgb(from var(--color-error) r g b / 0.10) !important;
 color: var(--color-error-darker) !important;
}
.av-alert-soft.mud-alert.mud-alert-filled-error .mud-alert-icon,
.av-alert-soft.mud-alert.mud-alert-outlined-error .mud-alert-icon,
.av-alert-soft.mud-alert.mud-alert-text-error .mud-alert-icon {
 color: var(--color-error-darker) !important;
}
html.dark .av-alert-soft.mud-alert.mud-alert-filled-error,
html.dark .av-alert-soft.mud-alert.mud-alert-outlined-error,
html.dark .av-alert-soft.mud-alert.mud-alert-text-error {
 background-color: rgb(from var(--color-error-light) r g b / 0.18) !important;
 color: var(--color-error-light) !important;
}
html.dark .av-alert-soft.mud-alert.mud-alert-filled-error .mud-alert-icon,
html.dark .av-alert-soft.mud-alert.mud-alert-outlined-error .mud-alert-icon,
html.dark .av-alert-soft.mud-alert.mud-alert-text-error .mud-alert-icon {
 color: var(--color-error-light) !important;
}

/* Normal (no severity color) */
.av-alert-soft.mud-alert.mud-alert-filled-normal,
.av-alert-soft.mud-alert.mud-alert-outlined-normal,
.av-alert-soft.mud-alert.mud-alert-text-normal {
 background-color: var(--color-gray-100) !important;
 color: var(--color-gray-800) !important;
}
html.dark .av-alert-soft.mud-alert.mud-alert-filled-normal,
html.dark .av-alert-soft.mud-alert.mud-alert-outlined-normal,
html.dark .av-alert-soft.mud-alert.mud-alert-text-normal {
 background-color: var(--color-dark-600) !important;
 color: var(--color-dark-100) !important;
}

/* ============================================================================
 * §41 ─── MudSnackbar — Guía Visual toast look (GLOBAL, no opt-in)
 * ----------------------------------------------------------------------------
 * MudSnackbar no expone Class por-instancia (config es global en Program.cs).
 * Para que las toasts del app tengan look Guía Visual (soft tint + rounded + shadow)
 * en lugar de bg sólido Mud default, se aplica el skin globalmente a
 * .mud-snackbar.mud-snackbar-X. Es cambio app-wide pero estrictamente mejora
 * legibilidad. Si en algún consumer puntual se necesita el look Mud default,
 * agregar la clase .mud-snackbar--unstyled como override (no implementado aún).
 * ============================================================================ */

.mud-snackbar {
 border-radius: var(--radius-md) !important;
 padding: 14px 18px !important;
 box-shadow: 0 10px 25px -3px rgb(from var(--color-gray-900) r g b / 0.12),
 0 4px 10px -2px rgb(from var(--color-gray-900) r g b / 0.05) !important;
}

html.dark .mud-snackbar {
 box-shadow: 0 10px 25px -3px rgb(from var(--color-dark-900) r g b / 0.45),
 0 4px 10px -2px rgb(from var(--color-dark-900) r g b / 0.30) !important;
}

/* Info */
.mud-snackbar.mud-snackbar-info {
 background-color: rgb(from var(--color-info) r g b / 0.95) !important;
 color: var(--color-white) !important;
}
html.dark .mud-snackbar.mud-snackbar-info {
 background-color: var(--color-info-darker) !important;
}

/* Success */
.mud-snackbar.mud-snackbar-success {
 background-color: rgb(from var(--color-success) r g b / 0.95) !important;
 color: var(--color-white) !important;
}
html.dark .mud-snackbar.mud-snackbar-success {
 background-color: var(--color-success-darker) !important;
}

/* Warning */
.mud-snackbar.mud-snackbar-warning {
 background-color: rgb(from var(--color-warning) r g b / 0.95) !important;
 color: var(--color-white) !important;
}
html.dark .mud-snackbar.mud-snackbar-warning {
 background-color: var(--color-warning-darker) !important;
}

/* Error */
.mud-snackbar.mud-snackbar-error {
 background-color: rgb(from var(--color-error) r g b / 0.95) !important;
 color: var(--color-white) !important;
}
html.dark .mud-snackbar.mud-snackbar-error {
 background-color: var(--color-error-darker) !important;
}

/* Normal (no severity) — clean dark/light card */
.mud-snackbar.mud-snackbar-normal {
 background-color: var(--color-gray-800) !important;
 color: var(--color-white) !important;
}
html.dark .mud-snackbar.mud-snackbar-normal {
 background-color: var(--color-dark-700) !important;
 color: var(--color-dark-50) !important;
}

/* ============================================================================
 * §42 ─── Av-Chip Outlined — Guía Visual outlined tag (opt-in)
 * ----------------------------------------------------------------------------
 * Replaces Mud's default outlined chip (which uses solid color border) with
 * Guía Visual outlined look: subtle gray-300 border by default, color-darker text,
 * border becomes the color on hover/focus. Apply additively:
 * <MudChip Class="av-chip-outlined" Color="Color.X">
 * Same compact dimensions as av-chip-soft.
 * ============================================================================ */

.av-chip-outlined.mud-chip {
 border-radius: 4px;
 padding: 2px 8px;
 font-size: 0.6875rem;
 font-weight: 600;
 line-height: 1.3;
 letter-spacing: 0.02em;
 height: auto;
 min-height: 0;
 background-color: transparent !important;
 border: 1px solid var(--color-gray-300) !important;
 transition: border-color 150ms ease, color 150ms ease;
}

html.dark .av-chip-outlined.mud-chip {
 border-color: var(--color-dark-450, var(--color-dark-400)) !important;
}

.av-chip-outlined.mud-chip .mud-chip-icon {
 font-size: 0.875rem;
 width: 0.875rem;
 height: 0.875rem;
}

/* Default (neutral) */
.av-chip-outlined.mud-chip.mud-chip-color-default {
 color: var(--color-gray-800) !important;
}
html.dark .av-chip-outlined.mud-chip.mud-chip-color-default {
 color: var(--color-dark-100) !important;
}
.av-chip-outlined.mud-chip.mud-chip-color-default:hover {
 border-color: var(--color-gray-800) !important;
}
html.dark .av-chip-outlined.mud-chip.mud-chip-color-default:hover {
 border-color: var(--color-dark-100) !important;
}

/* Primary */
.av-chip-outlined.mud-chip.mud-chip-color-primary {
 color: var(--color-primary-700) !important;
}
html.dark .av-chip-outlined.mud-chip.mud-chip-color-primary {
 color: var(--color-primary-300) !important;
 border-color: rgb(from var(--color-primary-300) r g b / 0.3) !important;
}
.av-chip-outlined.mud-chip.mud-chip-color-primary:hover {
 border-color: var(--color-primary-700) !important;
}
html.dark .av-chip-outlined.mud-chip.mud-chip-color-primary:hover {
 border-color: var(--color-primary-300) !important;
}

/* Secondary */
.av-chip-outlined.mud-chip.mud-chip-color-secondary {
 color: var(--color-secondary-darker) !important;
}
html.dark .av-chip-outlined.mud-chip.mud-chip-color-secondary {
 color: var(--color-secondary-light) !important;
 border-color: rgb(from var(--color-secondary-light) r g b / 0.3) !important;
}
.av-chip-outlined.mud-chip.mud-chip-color-secondary:hover {
 border-color: var(--color-secondary-darker) !important;
}
html.dark .av-chip-outlined.mud-chip.mud-chip-color-secondary:hover {
 border-color: var(--color-secondary-light) !important;
}

/* Info */
.av-chip-outlined.mud-chip.mud-chip-color-info {
 color: var(--color-info-darker) !important;
}
html.dark .av-chip-outlined.mud-chip.mud-chip-color-info {
 color: var(--color-info-light) !important;
 border-color: rgb(from var(--color-info-light) r g b / 0.3) !important;
}
.av-chip-outlined.mud-chip.mud-chip-color-info:hover {
 border-color: var(--color-info-darker) !important;
}
html.dark .av-chip-outlined.mud-chip.mud-chip-color-info:hover {
 border-color: var(--color-info-light) !important;
}

/* Success */
.av-chip-outlined.mud-chip.mud-chip-color-success {
 color: var(--color-success-darker) !important;
}
html.dark .av-chip-outlined.mud-chip.mud-chip-color-success {
 color: var(--color-success-light) !important;
 border-color: rgb(from var(--color-success-light) r g b / 0.3) !important;
}
.av-chip-outlined.mud-chip.mud-chip-color-success:hover {
 border-color: var(--color-success-darker) !important;
}
html.dark .av-chip-outlined.mud-chip.mud-chip-color-success:hover {
 border-color: var(--color-success-light) !important;
}

/* Warning */
.av-chip-outlined.mud-chip.mud-chip-color-warning {
 color: var(--color-warning-darker) !important;
}
html.dark .av-chip-outlined.mud-chip.mud-chip-color-warning {
 color: var(--color-warning-light) !important;
 border-color: rgb(from var(--color-warning-light) r g b / 0.3) !important;
}
.av-chip-outlined.mud-chip.mud-chip-color-warning:hover {
 border-color: var(--color-warning-darker) !important;
}
html.dark .av-chip-outlined.mud-chip.mud-chip-color-warning:hover {
 border-color: var(--color-warning-light) !important;
}

/* Error */
.av-chip-outlined.mud-chip.mud-chip-color-error {
 color: var(--color-error-darker) !important;
}
html.dark .av-chip-outlined.mud-chip.mud-chip-color-error {
 color: var(--color-error-light) !important;
 border-color: rgb(from var(--color-error-light) r g b / 0.3) !important;
}
.av-chip-outlined.mud-chip.mud-chip-color-error:hover {
 border-color: var(--color-error-darker) !important;
}
html.dark .av-chip-outlined.mud-chip.mud-chip-color-error:hover {
 border-color: var(--color-error-light) !important;
}


/* ============================================================================
 * §43 ─── Av-Swap — Guía Visual toggle entre dos vistas (opt-in, native HTML)
 * ----------------------------------------------------------------------------
 * Pattern Guía Visual (no hay equivalente MudBlazor). Usa nativo <button> con dos
 * hijos <span> superpuestos en una grilla de 1×1. Click toggles el atributo
 * data-swap-state entre "on" y "off". 3 effects: fade (default), flip, rotate.
 *
 * Markup:
 * <button type="button" class="av-swap av-swap--fade"
 * data-swap-state="on" disabled?>
 * <span class="av-swap__on">…contenido on…</span>
 * <span class="av-swap__off">…contenido off…</span>
 * </button>
 *
 * Modificadores:
 * .av-swap--fade — transición de opacidad (default Guía Visual)
 * .av-swap--flip — rotateY 180° en el eje vertical (cara A → cara B)
 * .av-swap--rotate — rotate 45° en plano XY
 *
 * Cero efecto colateral — selector scope-restringido a .av-swap.
 * ============================================================================ */

.av-swap {
 position: relative;
 display: inline-grid;
 place-content: center;
 background: transparent;
 border: 0;
 padding: 0;
 cursor: pointer;
 user-select: none;
 color: inherit;
 line-height: 1;
}

 .av-swap[disabled],
 .av-swap[aria-disabled="true"] {
 cursor: not-allowed;
 opacity: 0.6;
 }

 .av-swap:focus-visible {
 outline: 2px solid var(--color-primary-500);
 outline-offset: 4px;
 border-radius: 4px;
 }

.av-swap__on,
.av-swap__off {
 grid-column: 1 / 2;
 grid-row: 1 / 2;
 fill: currentColor;
 transition: transform 300ms ease-out, opacity 300ms ease-out;
}

/* — Effect: fade (default) — — — — — — — — — — — — — — — — — — — — — — — */

.av-swap[data-swap-state="on"] .av-swap__off { opacity: 0; }
.av-swap[data-swap-state="off"] .av-swap__on { opacity: 0; }

/* — Effect: flip — — — — — — — — — — — — — — — — — — — — — — — — — — — — */

.av-swap--flip .av-swap__on,
.av-swap--flip .av-swap__off {
 backface-visibility: hidden;
 transform-style: preserve-3d;
}

.av-swap--flip[data-swap-state="on"] .av-swap__on { transform: rotateY(0deg); }
.av-swap--flip[data-swap-state="on"] .av-swap__off { transform: rotateY(180deg); opacity: 0; }
.av-swap--flip[data-swap-state="off"] .av-swap__on { transform: rotateY(180deg); opacity: 0; }
.av-swap--flip[data-swap-state="off"] .av-swap__off { transform: rotateY(0deg); }

/* — Effect: rotate — — — — — — — — — — — — — — — — — — — — — — — — — — — */

.av-swap--rotate[data-swap-state="on"] .av-swap__on { transform: rotate(0deg); }
.av-swap--rotate[data-swap-state="on"] .av-swap__off { transform: rotate(-45deg); opacity: 0; }
.av-swap--rotate[data-swap-state="off"] .av-swap__on { transform: rotate(45deg); opacity: 0; }
.av-swap--rotate[data-swap-state="off"] .av-swap__off { transform: rotate(0deg); }

/* ============================================================================
 * §44 ─── Av-Box — colored variants (opt-in skin para MudPaper)
 * ----------------------------------------------------------------------------
 * Replica el patrón Guía Visual <Box className="bg-{color}-600 text-white"> con
 * MudPaper + clase opt-in .av-box-{color}. Cubre 6 semánticos:
 * primary / secondary / info / success / warning / error con text-white.
 *
 * Distinto de:
 * .av-alert-soft (§40) — tinte al 10% + texto darker, severity-bound
 * MudCard — header/content/actions estructurado
 * Box default — wrapper genérico sin color
 *
 * Cero efecto colateral — selector scope-restringido a .av-box-X.
 * Children MudText heredan el color via .av-box-X .mud-typography { color: inherit }.
 * ============================================================================ */

.av-box-primary.mud-paper {
 background-color: var(--color-primary-600);
 color: var(--color-white);
 box-shadow: none;
 --av-this: var(--color-primary-600); /* exponer para av-box-glow */
}

html.dark .av-box-primary.mud-paper {
 background-color: var(--color-primary-500);
 --av-this: var(--color-primary-500);
}

.av-box-secondary.mud-paper {
 background-color: var(--color-secondary);
 color: var(--color-white);
 box-shadow: none;
 --av-this: var(--color-secondary);
}

.av-box-info.mud-paper {
 background-color: var(--color-info);
 color: var(--color-white);
 box-shadow: none;
 --av-this: var(--color-info);
}

.av-box-success.mud-paper {
 background-color: var(--color-success);
 color: var(--color-white);
 box-shadow: none;
 --av-this: var(--color-success);
}

.av-box-warning.mud-paper {
 background-color: var(--color-warning);
 color: var(--color-white);
 box-shadow: none;
 --av-this: var(--color-warning);
}

.av-box-error.mud-paper {
 background-color: var(--color-error);
 color: var(--color-white);
 box-shadow: none;
 --av-this: var(--color-error);
}

/* Children inherit the box color so MudText / MudIcon read on the tinted bg. */
.av-box-primary.mud-paper .mud-typography,
.av-box-secondary.mud-paper .mud-typography,
.av-box-info.mud-paper .mud-typography,
.av-box-success.mud-paper .mud-typography,
.av-box-warning.mud-paper .mud-typography,
.av-box-error.mud-paper .mud-typography,
.av-box-primary.mud-paper .mud-icon-root,
.av-box-secondary.mud-paper .mud-icon-root,
.av-box-info.mud-paper .mud-icon-root,
.av-box-success.mud-paper .mud-icon-root,
.av-box-warning.mud-paper .mud-icon-root,
.av-box-error.mud-paper .mud-icon-root {
 color: inherit;
}

/* ============================================================================
 * §44 ext ─── Box — Simple / Rounded / Bordered / Glow / Gradient / Outlined-Gradient
 * ----------------------------------------------------------------------------
 * Extensiones aditivas para cubrir las 11 secciones del demo Guía Visual Box:
 * Simple → shadow-soft custom Guía Visual (light) / shadow-none (dark)
 * Rounded → radius 16 px ( rounded-2xl) — override del bridge §66
 * Bordered → border gray-150 / dark-600
 * Glow → shadow-lg tinted del --av-this (via av-color-X o av-box-X)
 * Gradient → 3 paletas (purple-indigo / fuchsia-pink / amber-orange)
 * Outlined Gradient → wrapper gradient + inner gray-50 / dark-900 (3 paletas)
 *
 * Cero impacto sobre las 6 variantes colored existentes. av-box-X siguen
 * funcionando standalone — la única adición es `--av-this` para que
 * av-box-glow pueda consumirlo. Los gradients y outlined-gradient son
 * primitivas nuevas independientes.
 * ============================================================================ */

/* — Simple Box — shadow-soft custom Guía Visual (light) + dark:shadow-none. */

.av-shadow-soft.mud-paper {
 box-shadow: var(--shadow-soft) !important;
}
html.dark .av-shadow-soft.mud-paper {
 box-shadow: none !important;
}

/* — Rounded Box — rounded-2xl = 16 px. Bate al override del bridge
 §66 (.mud-paper border-radius: var(--radius-lg) !important = 8 px) por
 mayor specificity (0,2,0 vs 0,1,0). */

.av-rounded-2xl.mud-paper {
 border-radius: 16px !important;
}

/* — Bordered Box — border gray-150 light / dark-600 dark. Sin box-shadow
 (Guía Visual Bordered demo no lleva shadow). */

.av-box-bordered.mud-paper {
 border: 1px solid var(--color-gray-150);
 box-shadow: none !important;
}
html.dark .av-box-bordered.mud-paper {
 border-color: var(--color-dark-600);
}

/* — Glow modifier — shadow-lg tinted del --av-this/50. Combinable con
 av-box-X (donde el bg + --av-this ya está declarado) o con av-color-X
 (que también declara --av-this) sobre un MudPaper con bg manual. */

.av-box-glow.mud-paper {
 box-shadow:
 0 10px 15px -3px rgb(from var(--av-this, var(--color-gray-300)) r g b / 0.50),
 0 4px 6px -4px rgb(from var(--av-this, var(--color-gray-300)) r g b / 0.50);
}

/* — Gradient Box — 3 paletas del demo. Sin shadow (Guía Visual Gradient demo no
 lleva shadow). Text color white forzado por contraste sobre los gradients. */

.av-box-gradient-purple-indigo.mud-paper {
 background: linear-gradient(to bottom right, #a855f7, #4f46e5);
 color: var(--color-white);
 box-shadow: none !important;
}
.av-box-gradient-fuchsia-pink.mud-paper {
 background: linear-gradient(to right, #c026d3, #db2777);
 color: var(--color-white);
 box-shadow: none !important;
}
.av-box-gradient-amber-orange.mud-paper {
 background: linear-gradient(to bottom right, #fbbf24, #ea580c);
 color: var(--color-white);
 box-shadow: none !important;
}
/* Guía Visual Circlebar Custom: from-green-400 to-blue-600 (bottom-right). */
.av-box-gradient-green-blue.mud-paper {
 background: linear-gradient(to bottom right, #4ade80, #2563eb);
 color: var(--color-white);
 box-shadow: none !important;
}

.av-box-gradient-purple-indigo.mud-paper .mud-typography,
.av-box-gradient-fuchsia-pink.mud-paper .mud-typography,
.av-box-gradient-amber-orange.mud-paper .mud-typography,
.av-box-gradient-green-blue.mud-paper .mud-typography {
 color: inherit;
}

/* — Outlined Gradient Box — wrapper con gradient bg + p-1 (4px padding) y
 un inner MudPaper con bg-gray-50 (light) / bg-dark-900 (dark). El
 gradient queda visible como un borde 4 px. 3 paletas del demo
 (sky-blue / green-fuchsia / amber-orange).

 Padding del wrapper: 4 px ( p-1). El consumidor del inner
 aporta su propio padding (típicamente pa-4 = 16 px). */

.av-box-outlined-gradient-wrapper.mud-paper {
 padding: 4px !important;
 box-shadow: none !important;
}

.av-box-outlined-gradient-sky-blue.mud-paper {
 background: linear-gradient(to right, #38bdf8, #2563eb);
}
.av-box-outlined-gradient-green-fuchsia.mud-paper {
 background: linear-gradient(to right, #4ade80, #e879f9);
}
.av-box-outlined-gradient-amber-orange.mud-paper {
 background: linear-gradient(to right, #fbbf24, #ea580c);
}

/* Inner — gray-50 light / dark-900 dark. Sin shadow (heredaría del Mud
 default). El radius lo aporta el bridge (8 px). */
.av-box-outlined-gradient-inner.mud-paper {
 background-color: var(--color-gray-50);
 box-shadow: none !important;
}
html.dark .av-box-outlined-gradient-inner.mud-paper {
 background-color: var(--color-dark-900);
}

/* ============================================================================
 * §45 ─── Av-Mask — Guía Visual mask shapes (opt-in, applicable a cualquier element)
 * ----------------------------------------------------------------------------
 * Réplica del patrón Guía Visual <X className="mask is-squircle"> que recorta
 * visualmente cualquier elemento (Avatar, imagen, div coloreado, etc.) con
 * una forma SVG mask. Cubre 7 shapes del demo:
 * - .av-mask-squircle (superellipse, iOS rounded square)
 * - .av-mask-reuleaux-triangle (triángulo de bordes curvos)
 * - .av-mask-diamond (rombo con esquinas suavizadas)
 * - .av-mask-hexagon (hexágono vertical regular)
 * - .av-mask-octagon (octágono con esquinas ligeramente redondeadas)
 * - .av-mask-star (estrella de 12 puntas suaves)
 * - .av-mask-heart (corazón clásico)
 *
 * Tokens viven en design-tokens.css como --av-{shape}-mask. Para usar:
 * <MudAvatar Color="Color.Primary" Square="true" Class="av-mask av-mask-heart">JD</MudAvatar>
 * <img src="..." class="av-mask av-mask-hexagon" />
 *
 * Cero efecto colateral — selector scope-restringido a .av-mask y modifiers.
 * El border-radius:0 explícito anula cualquier radius del consumidor para que
 * no compita con el mask (mismo principio que §31 av-avatar-squircle).
 *
 * Nota: para Avatar squircle específico, preferir el shortcut .av-avatar-squircle
 * (§31) que cubre el caso más común sin requerir el modifier extra .av-mask.
 * ============================================================================ */

.av-mask {
 border-radius: 0 !important;
 -webkit-mask-position: center;
 mask-position: center;
 -webkit-mask-repeat: no-repeat;
 mask-repeat: no-repeat;
 -webkit-mask-size: contain;
 mask-size: contain;
}

.av-mask-squircle {
 -webkit-mask-image: var(--av-squircle-mask);
 mask-image: var(--av-squircle-mask);
}

.av-mask-reuleaux-triangle {
 -webkit-mask-image: var(--av-reuleaux-triangle-mask);
 mask-image: var(--av-reuleaux-triangle-mask);
}

.av-mask-diamond {
 -webkit-mask-image: var(--av-diamond-mask);
 mask-image: var(--av-diamond-mask);
}

.av-mask-hexagon {
 -webkit-mask-image: var(--av-hexagon-mask);
 mask-image: var(--av-hexagon-mask);
}

.av-mask-octagon {
 -webkit-mask-image: var(--av-octagon-mask);
 mask-image: var(--av-octagon-mask);
}

.av-mask-star {
 -webkit-mask-image: var(--av-star-mask);
 mask-image: var(--av-star-mask);
}

.av-mask-heart {
 -webkit-mask-image: var(--av-heart-mask);
 mask-image: var(--av-heart-mask);
}

/* ============================================================================
 * §46 ─── Av Utility classes — pixel-perfect helpers for showcases & UI
 * ----------------------------------------------------------------------------
 * Set de utility classes que mapean directo a las clases del demo
 * Guía Visual (size-N, rounded-X, ring-N, gradients, etc.). Centraliza los
 * valores exactos en clases reusables para reemplazar inline Style en
 * showcases y código de producción.
 *
 * Naming: `.av-{group}-{value}` o `.av-{purpose}`.
 * - Sizes: .av-size-{8|10|12|14|16|20|24} → 32 / 40 / 48 / 56 / 64 / 80 / 96 px (Guía Visual scale)
 * - Radius: .av-rounded-{lg|xl|full} → 8 / 12 / 9999 px
 * - Ring: .av-ring-{2|3} → box-shadow 2 / 3 px ring (white light, dark-700 dark)
 * - Overlap: .av-stack-overlap → -8 px margin-left en > *:not(:first-child)
 * - Gradient: .av-gradient-{name} → 5 named gradients para avatar borders
 *
 * Cero efecto colateral — todas las clases son opt-in `.av-*`.
 * ============================================================================ */

/* — Size utilities ( size-N scale → px) — — — — — — — — — — — — —
 Usan !important porque Mud aplica width/height a sus componentes
 (.mud-avatar, .mud-skeleton, etc.) con la misma specificity que el
 utility + later source order. El precedente vive en §35 av-avatar-xs.
*/
/* Sub-scale (size-N para N ∈ {3, 3.5, 4, 5, 6, 7}) — iconos dentro de
 primitivas (badge, chip, button). Naming : size-N = N*4 px.
 `av-size-3-5` usa hyphen en vez de dot para evitar escape CSS y mantener
 HTML class attribute libre de caracteres especiales. */
.av-size-3 { width: 12px !important; height: 12px !important; }
.av-size-3-5 { width: 14px !important; height: 14px !important; }
.av-size-4 { width: 16px !important; height: 16px !important; }
.av-size-4-5 { width: 18px !important; height: 18px !important; }
.av-size-5 { width: 20px !important; height: 20px !important; }
.av-size-6 { width: 24px !important; height: 24px !important; }
.av-size-7 { width: 28px !important; height: 28px !important; }

.av-size-8 { width: 32px !important; height: 32px !important; }
.av-size-10 { width: 40px !important; height: 40px !important; }
.av-size-12 { width: 48px !important; height: 48px !important; }
.av-size-14 { width: 56px !important; height: 56px !important; }
.av-size-16 { width: 64px !important; height: 64px !important; }
.av-size-20 { width: 80px !important; height: 80px !important; }
.av-size-24 { width: 96px !important; height: 96px !important; }
.av-size-full { width: 100% !important; height: 100% !important; }

/* — Radius utilities — — — — — — — — — — — — — — — — — — — — — — — — —
 El selector base sirve para elementos non-Mud. Los compuestos
 `.av-rounded-X.mud-button-root:not(.mud-fab)` (specificity 0,3,0)
 matchean la specificity del override defensivo en mud-bridge.css
 (`.mud-button-root:not(.mud-icon-button):not(.mud-fab)` también
 0,3,0 + !important) → como avalme-v1.css carga después que
 mud-bridge.css, ganamos por source order al estar a igual !important.

 Los compound con .mud-icon-button-root son para MudIconButton (la
 bridge ya lo excluye con :not(.mud-icon-button)) — no necesita
 override extra, pero lo dejamos para casos donde otra regla Mud
 ponga radius en icon-button-root. */
.av-rounded-lg,
.av-rounded-lg.mud-button-root:not(.mud-fab),
.av-rounded-lg.mud-icon-button-root { border-radius: 8px !important; }

.av-rounded-xl,
.av-rounded-xl.mud-button-root:not(.mud-fab),
.av-rounded-xl.mud-icon-button-root { border-radius: 12px !important; }

.av-rounded-full,
.av-rounded-full.mud-button-root:not(.mud-fab),
.av-rounded-full.mud-icon-button-root { border-radius: 9999px !important; }

/* — Ring utilities (box-shadow rings around avatars / images) — — — — — — */
.av-ring-2 { box-shadow: 0 0 0 2px var(--color-white); }
.av-ring-3 { box-shadow: 0 0 0 3px var(--color-white); }

html.dark .av-ring-2 { box-shadow: 0 0 0 2px var(--color-dark-700); }
html.dark .av-ring-3 { box-shadow: 0 0 0 3px var(--color-dark-700); }

/* — Text color utilities ( text-{color}) — — — — — — — — — — — —
 Aplican `color: var(--color-X)`. Usados sobre MudIcon (cuyo SVG hereda
 `fill/stroke: currentColor`) o sobre <span> hijos donde queremos tintar
 un fragmento sin afectar al padre. */
.av-text-primary { color: var(--color-primary-600); }
.av-text-secondary { color: var(--color-secondary); }
.av-text-info { color: var(--color-info); }
.av-text-success { color: var(--color-success); }
.av-text-warning { color: var(--color-warning); }
.av-text-error { color: var(--color-error); }

html.dark .av-text-primary { color: var(--color-primary-400); }
html.dark .av-text-secondary { color: var(--color-secondary-lighter); }
html.dark .av-text-info { color: var(--color-info-lighter); }
html.dark .av-text-success { color: var(--color-success-lighter); }
html.dark .av-text-warning { color: var(--color-warning-lighter); }
html.dark .av-text-error { color: var(--color-error-lighter); }

/* — Stroke width utility ( stroke-{N}) — — — — — — — — — — — — —
 Override del stroke-width hardcoded en los path SVG de HeroIcons.Outline
 (default 1.5). CSS gana sobre el attribute SVG porque CSS tiene mayor
 precedencia que presentational attributes. */
.av-stroke-2 path {
 stroke-width: 2;
}

/* — Stack overlap (flex row + negative inline-start margin) — — — — — —
 display: inline-flex es obligatorio porque children no-flex (MudSkeleton
 con <span> default block) quedarían stackeados vertical sin el wrapper
 flex. Alineamos al center para que tamaños distintos no rompan el row.
*/
.av-stack-overlap {
 display: inline-flex;
 align-items: center;
}

.av-stack-overlap > *:not(:first-child) {
 margin-inline-start: -8px;
}

/* — Max-width utilities ( max-w-{size}) — Forms y otros showcases
 las usan para limitar ancho de inputs. Naming . */
.av-max-w-xs { max-width: 20rem; }
.av-max-w-sm { max-width: 24rem; }
.av-max-w-md { max-width: 28rem; }
.av-max-w-lg { max-width: 32rem; }
.av-max-w-xl { max-width: 36rem; }
.av-max-w-2xl { max-width: 42rem; }

/* — Min-width utilities ( min-w-{size}) — para components que necesitan
 un ancho mínimo (dialogs ad-hoc, popovers, paneles). Misma escala que
 av-max-w-X. */
.av-min-w-xs { min-width: 20rem; }
.av-min-w-sm { min-width: 24rem; }
.av-min-w-md { min-width: 28rem; }
.av-min-w-lg { min-width: 32rem; }
.av-min-w-xl { min-width: 36rem; }
.av-min-w-2xl { min-width: 42rem; }

/* — Max-height utilities ( max-h-{size}) — combina bien con av-scroll-shadow
 cuando queremos un contenedor scrollable con altura limitada. Misma escala
 que av-max-w-X. */
.av-max-h-xs { max-height: 20rem; }
.av-max-h-sm { max-height: 24rem; }
.av-max-h-md { max-height: 28rem; }
.av-max-h-lg { max-height: 32rem; }
.av-max-h-xl { max-height: 36rem; }
.av-max-h-2xl { max-height: 42rem; }

/* — Cursor utility ( cursor-pointer) — para elementos clickables que NO
 son button/link nativos (TreeViewItem, listas custom, decorative
 elements). Mud sí lo aplica a button-root automáticamente, pero no a
 todos los slots interactivos. */
.av-cursor-pointer { cursor: pointer; }

/* — Overflow utilities — — — — — — — — — — — — — — — — — — — — — — — —
 Para contenedores que combinan av-max-h-X con scroll vertical pero NO
 quieren los gradient fades de av-scroll-shadow (ese pinta un linear
 gradient white→transparent en top/bottom que tapa contenido corto). */
.av-overflow-y-auto { overflow-y: auto; }
.av-overflow-x-auto { overflow-x: auto; }
.av-overflow-hidden { overflow: hidden; }

/* — Tenant selector card — clickeable row card usado en TenantSelectorDialog.
 Renderiza un mini-card outlined con icon + name + url + jobTitle + roles
 + chevron derecho. Hover sutil. Click navega al tenant. */
.av-tenant-card {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 1px solid var(--color-gray-200) !important;
    border-radius: var(--radius-lg) !important;
    background-color: var(--surface-1) !important;
    transition: background-color 150ms ease, border-color 150ms ease;
    box-sizing: border-box;
}

.av-tenant-card:hover {
    background-color: rgb(from var(--color-primary-500) r g b / 0.04) !important;
    border-color: rgb(from var(--color-primary-500) r g b / 0.3) !important;
}

html.dark .av-tenant-card {
    border-color: var(--color-dark-500) !important;
    background-color: var(--color-dark-700) !important;
}

html.dark .av-tenant-card:hover {
    background-color: rgb(from var(--color-primary-400) r g b / 0.10) !important;
    border-color: rgb(from var(--color-primary-400) r g b / 0.4) !important;
}

.av-tenant-card__icon {
    flex: 0 0 auto;
    width: 28px !important;
    height: 28px !important;
}

/* — Showcase scroll-to-top FAB position — — — — — — — — — — — — — — —
 MudScrollToTop por default pinea el botón a bottom: 16-24px. Lo
 subimos para que no quede tan pegado al borde / al bottom AppBar de
 MainLayout cuando aparece. Scope estricto a `.av-showcase-scroll-top`
 para no afectar otros usos de MudScrollToTop en la app. */
.av-showcase-scroll-top {
    bottom: 80px !important;
}

/* — Show-on-hover utility — — — — — — — — — — — — — — — — — — — — — —
 El elemento queda invisible (pero NO display:none — sigue ocupando
 espacio) hasta que el cursor pasa sobre un ancestro común (típicamente
 la row de una lista / tree). Patrón estándar para trailing actions en
 listas (Notion, Linear, Gmail). Combina con cualquier hijo target.

 Activadores comunes — agregá tu propio si necesitás otro contenedor:
   .mud-treeview-item-content:hover .av-show-on-hover
   .mud-list-item:hover .av-show-on-hover
   .mud-table-row:hover .av-show-on-hover

 A11y: el focus-within también lo revela, así que la navegación por
 teclado puede llegar al action button sin necesitar mouse hover. */
.av-show-on-hover {
    opacity: 0;
    transition: opacity 150ms ease;
}

.mud-treeview-item-content:hover .av-show-on-hover,
.mud-treeview-item-content:focus-within .av-show-on-hover,
.mud-list-item:hover .av-show-on-hover,
.mud-list-item:focus-within .av-show-on-hover {
    opacity: 1;
}

/* — Truncate utility ( truncate) — overflow + ellipsis + nowrap.
 Útil cuando un elemento collapsed muestra una sola línea (ej: MinWidth
 variant del Collapse demo). */
.av-truncate {
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}

/* — Scroll shadow approximation (Guía Visual ScrollShadow component) — overflow
 con gradient fades top/bottom para indicar contenido scrollable. Aplica
 sobre cualquier wrapper que tenga max-height + overflow. */
.av-scroll-shadow {
 position: relative;
 overflow-y: auto;
}

.av-scroll-shadow::before,
.av-scroll-shadow::after {
 content: "";
 position: sticky;
 left: 0;
 right: 0;
 height: 16px;
 display: block;
 pointer-events: none;
}

.av-scroll-shadow::before {
 top: 0;
 background: linear-gradient(to bottom, var(--color-white), transparent);
 margin-bottom: -16px;
}

.av-scroll-shadow::after {
 bottom: 0;
 background: linear-gradient(to top, var(--color-white), transparent);
 margin-top: -16px;
}

html.dark .av-scroll-shadow::before {
 background: linear-gradient(to bottom, var(--color-dark-700), transparent);
}
html.dark .av-scroll-shadow::after {
 background: linear-gradient(to top, var(--color-dark-700), transparent);
}

/* — Gradient borders (5 paletas del demo Guía Visual GradientBorder) — — — — */
.av-gradient-sky-blue { background: linear-gradient(to right, #38bdf8, #2563eb); }
.av-gradient-amber-orange { background: linear-gradient(to right, #fbbf24, #ea580c); }
.av-gradient-pink-rose { background: linear-gradient(to right, #ec4899, #f43f5e); }
.av-gradient-purple-orange { background: linear-gradient(to right, #a855f7, #ea580c); }
.av-gradient-green-fuchsia { background: linear-gradient(to right, #4ade80, #e879f9); }

/* — Gradient backgrounds (Custom Styles del demo Guía Visual) — — — — — — — — */
.av-gradient-bg-green-blue { background: linear-gradient(to bottom right, #4ade80, #2563eb); color: var(--color-white); }
.av-gradient-bg-amber-orange{ background: linear-gradient(to bottom right, #fbbf24, #ea580c); color: var(--color-white); }

/* — Gradient border wrappers — pattern Guía Visual InstagramStory-style — — — */
/* Wrapper exterior: size-16 + p-0.5 + rounded-full + gradient bg */
.av-gradient-border-wrapper {
 display: inline-flex;
 width: 64px;
 height: 64px;
 padding: 2px;
 border-radius: 9999px;
}

/* Wrapper interior: size-15 + p-[3px] + rounded-full + bg-white */
.av-gradient-border-inner {
 display: inline-flex;
 width: 60px;
 height: 60px;
 padding: 3px;
 border-radius: 9999px;
 background-color: var(--color-white);
}

html.dark .av-gradient-border-inner {
 background-color: var(--color-dark-700);
}

/* — Custom avatar variants (showcase Custom Styles) — — — — — — — — — — */

/* Brand color: Twitter blue */
.av-avatar-brand-twitter.mud-avatar {
 background-color: #1C96E8;
 color: var(--color-white);
}

/* Outlined transparent — border + no fill (different of av-chip-outlined) */
.av-avatar-outlined.mud-avatar {
 background-color: transparent;
 border: 1px solid var(--color-gray-400);
 color: var(--color-gray-700);
}

html.dark .av-avatar-outlined.mud-avatar {
 border-color: var(--color-dark-400);
 color: var(--color-dark-100);
}

/* Glow shadow effect (drop-shadow tinted of the current color) */
.av-glow-primary {
 box-shadow: 0 8px 24px rgb(from var(--color-primary-500) r g b / 0.5);
}

html.dark .av-glow-primary {
 box-shadow: 0 8px 24px rgb(from var(--color-primary-400) r g b / 0.5);
}

/* ============================================================================
 * §47 ─── Av-Spinner — Guía Visual border-only spinners (pixel-perfect demo)
 * ============================================================================
 *
 * Guía Visual usa spinners CSS-only de borde (no Material/indeterminate). 4
 * variantes del demo `components/spinner` + uso en `components/button/Loading.jsx`:
 *
 * 1. `.av-spinner` — círculo 3/4 (3 lados con border
 * gris-500, lado derecho transparente).
 * Para botones neutral / outside.
 * 2. `.av-spinner.av-spinner--on-color` — mismo patrón pero border blanco
 * (GhostSpinner default — dentro de
 * botones filled colored).
 * 3. `.av-spinner.av-spinner--soft` — border blanco 30 % opacity + lado
 * derecho blanco sólido. Efecto
 * "cometa" (GhostSpinner variant="soft").
 * 4. `.av-spinner.av-spinner--inner-dot` — usa SVG inline en el markup; este
 * modifier solo da color (white).
 *
 * Marcado canónico (replace MudProgressCircular):
 * <MudElement HtmlTag="span" Class="av-spinner av-spinner--on-color" />
 *
 * Para innerDot el SVG va inline en el markup; ver showcase §12 Loading.
 *
 * Spec demo (Spinner index.jsx + spinner.css):
 * size: 16 × 16 px (size-4 = 1rem)
 * border: 2 px (border-2)
 * radius: 9999 px
 * anim: rotate 360° / 1 s linear infinite
 * ============================================================================ */

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

.av-spinner {
 display: inline-block;
 width: 16px;
 height: 16px;
 flex-shrink: 0;
 box-sizing: border-box;
 border: 2px solid var(--color-gray-500);
 border-right-color: transparent;
 border-radius: 9999px;
 animation: av-spinner-spin 1s linear infinite;
}

html.dark .av-spinner {
 border-color: var(--color-dark-400);
 border-right-color: transparent;
}

/* GhostSpinner default — usado dentro de botones colored (filled primary etc).
 Border blanco en 3 lados + transparente a la derecha. */
.av-spinner.av-spinner--on-color {
 border-color: var(--color-white);
 border-right-color: transparent;
}

html.dark .av-spinner.av-spinner--on-color {
 border-color: var(--color-white);
 border-right-color: transparent;
}

/* GhostSpinner soft — efecto "cometa": base white 30 % + lado derecho white sólido. */
.av-spinner.av-spinner--soft {
 border-color: rgb(from var(--color-white) r g b / 0.30);
 border-right-color: var(--color-white);
}

html.dark .av-spinner.av-spinner--soft {
 border-color: rgb(from var(--color-white) r g b / 0.30);
 border-right-color: var(--color-white);
}

/* GhostSpinner innerDot — sin border. Solo flexbox + animación + color via SVG.
 El SVG con currentColor=white va inline en el markup (no podemos meterlo via
 CSS background sin sacrificar el spinning suave en algunos browsers). */
.av-spinner.av-spinner--inner-dot {
 border: none;
 color: var(--color-white);
 display: inline-flex;
 align-items: center;
 justify-content: center;
}

.av-spinner.av-spinner--inner-dot > svg {
 width: 100%;
 height: 100%;
 fill: currentColor;
}

/* ============================================================================
 * §48 ─── Av-Badge — Guía Visual Badge component (pixel-perfect demo)
 * ============================================================================
 *
 * Guía Visual <Badge> es un status tag passive (no clickable, no hover), distinto
 * de MudChip (interactive). Para no traer el chrome de Mud (cursor pointer,
 * hover, padding, etc.) renderiza como <MudElement HtmlTag="span" Class="av-badge ...">
 * con el color chain `av-color-X` (definido en §14.1 ext) y variantes opt-in:
 *
 * - .av-badge — base (badge-base + badge del demo)
 * - .av-badge.av-badge-filled — filled (default Guía Visual)
 * - .av-badge.av-badge-outlined — border + colored text, bg transparent
 * - .av-badge.av-badge-soft — tinted bg + darker text (variant="soft")
 * - .av-badge.av-badge-bordered — modifier aditivo sobre soft (border darker/20)
 * - .av-badge.av-badge-glow — modifier aditivo (box-shadow tinted)
 *
 * Color chain — compatible con `av-color-{primary|secondary|info|success|warning|error}`
 * (§14.1 ext). Sin av-color-X cae al neutral (gray-200 bg / gray-900 text / etc.).
 *
 * Spec del demo (badge.css + index.jsx):
 * font: font-medium leading-none tracking-wide text-xs (12px / 500 / 1 / 0.025em)
 * padding: py-1 px-2 (4 px / 8 px)
 * radius: rounded-sm (4 px) — usar `av-rounded-full` para pill
 * border: 1px transparent baseline (outlined/bordered lo sobrescriben)
 * align: inline-flex + items-center + justify-center + align-baseline
 * glow: shadow-lg + shadow-this/50 (tinted del color activo)
 *
 * NOTA typography: declarar font-size/-weight/-line-height/-letter-spacing va
 * contra la regla §Typography de CLAUDE.md. Como Badge renderiza fuera de
 * .mud-typography-* (es <span> raw), entra en la misma excepción documentada
 * para `av-btn` / `av-avatar` / form-controls — la métrica de la primitiva
 * vive en su clase, pero igual consume `--font-sans` por el bridge.
 * ============================================================================ */

.av-badge {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 vertical-align: baseline;
 box-sizing: border-box;

 font-family: var(--font-sans);
 font-size: 12px; /* text-xs */
 font-weight: 500; /* font-medium */
 line-height: 1; /* leading-none */
 letter-spacing: 0.025em; /* tracking-wide */

 padding: 4px 8px; /* py-1 px-2 */
 border-radius: 4px; /* rounded-sm */
 border: 1px solid transparent;

 transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

/* — Filled variant (default Guía Visual) — — — — — — — — — — — — — — — — — — */

.av-badge.av-badge-filled {
 background-color: var(--av-this, var(--color-gray-200));
 color: var(--color-white);
 border-color: transparent;
}

/* Filled neutral (sin av-color-X) — bg gray-200 + text gray-900 */
.av-badge.av-badge-filled:not([class*="av-color-"]) {
 background-color: var(--color-gray-200);
 color: var(--color-gray-900);
}

html.dark .av-badge.av-badge-filled:not([class*="av-color-"]) {
 background-color: var(--surface-2);
 color: var(--color-dark-50);
}

/* — Outlined variant — — — — — — — — — — — — — — — — — — — — — — — — — */

.av-badge.av-badge-outlined {
 background-color: transparent;
 color: var(--av-this, var(--color-gray-900));
 border-color: rgb(from var(--av-this, var(--color-gray-300)) r g b / 0.30);
}

html.dark .av-badge.av-badge-outlined {
 color: var(--av-this-lighter, var(--color-dark-50));
 border-color: rgb(from var(--av-this-lighter, var(--surface-1)) r g b / 0.30);
}

/* Outlined neutral */
.av-badge.av-badge-outlined:not([class*="av-color-"]) {
 color: var(--color-gray-900);
 border-color: var(--color-gray-300);
}

html.dark .av-badge.av-badge-outlined:not([class*="av-color-"]) {
 color: var(--color-dark-50);
 border-color: var(--surface-1);
}

/* — Soft variant — — — — — — — — — — — — — — — — — — — — — — — — — — — */

.av-badge.av-badge-soft {
 background-color: rgb(from var(--av-this-darker, var(--color-gray-200)) r g b / 0.07);
 color: var(--av-this-darker, var(--color-gray-900));
 border-color: transparent;
}

html.dark .av-badge.av-badge-soft {
 background-color: rgb(from var(--av-this-lighter, var(--color-dark-500)) r g b / 0.10);
 color: var(--av-this-lighter, var(--color-dark-50));
}

/* Soft neutral */
.av-badge.av-badge-soft:not([class*="av-color-"]) {
 background-color: rgb(from var(--color-gray-200) r g b / 0.30);
 color: var(--color-gray-900);
}

html.dark .av-badge.av-badge-soft:not([class*="av-color-"]) {
 background-color: rgb(from var(--color-dark-500) r g b / 0.30);
 color: var(--color-dark-50);
}

/* — Bordered modifier (aditivo, normalmente sobre soft) — Guía Visual pattern
 `border border-this-darker/20 dark:border-this-lighter/20`. */

.av-badge.av-badge-bordered {
 border-color: rgb(from var(--av-this-darker, var(--color-gray-300)) r g b / 0.20);
}

html.dark .av-badge.av-badge-bordered {
 border-color: rgb(from var(--av-this-lighter, var(--color-dark-450)) r g b / 0.20);
}

/* — Glow modifier (aditivo) — shadow-lg shadow-this/50.
 shadow-lg = 0 10px 15px -3px / 0 4px 6px -4px con tint del color. */

.av-badge.av-badge-glow {
 box-shadow:
 0 10px 15px -3px rgb(from var(--av-this, var(--color-gray-300)) r g b / 0.50),
 0 4px 6px -4px rgb(from var(--av-this, var(--color-gray-300)) r g b / 0.50);
}

html.dark .av-badge.av-badge-glow {
 box-shadow:
 0 10px 15px -3px rgb(from var(--av-this-lighter, var(--color-dark-450)) r g b / 0.50),
 0 4px 6px -4px rgb(from var(--av-this-lighter, var(--color-dark-450)) r g b / 0.50);
}

/* Glow neutral fallback (sin av-color-X) */
.av-badge.av-badge-glow:not([class*="av-color-"]) {
 box-shadow:
 0 10px 15px -3px rgb(from var(--color-gray-200) r g b / 0.50),
 0 4px 6px -4px rgb(from var(--color-gray-200) r g b / 0.50);
}

html.dark .av-badge.av-badge-glow:not([class*="av-color-"]) {
 box-shadow:
 0 10px 15px -3px rgb(from var(--color-dark-450) r g b / 0.50),
 0 4px 6px -4px rgb(from var(--color-dark-450) r g b / 0.50);
}

/* — Icon inside badge — el demo usa size-3.5 / size-4 (14 / 16 px).
 Heroicons rendered via MudIcon necesitan tamaño manual; usar utility
 classes `av-size-3-5` (14px) / `av-size-4` (16px) del §46. */
.av-badge > svg,
.av-badge .mud-icon-root {
 flex-shrink: 0;
}

/* — Custom Badge variants (demo §8 Custom) — — — — — — — — — — — — — — */

/* Dark badge — bg dark-800 + text white. Guía Visual Custom: <Badge unstyled> con
 "bg-dark-800 px-2 py-1.5 text-xs text-white". */
.av-badge.av-badge-dark {
 background-color: var(--color-dark-800);
 color: var(--color-white);
 border-color: transparent;
}

/* Gradient pill — Guía Visual Custom: "bg-linear-to-r from-purple-500 to-orange-600".
 Distinto de av-btn-gradient-X (que apunta a .mud-button-root). Genérico
 para <span> raw. */
.av-badge.av-badge-gradient-purple-orange {
 background: linear-gradient(to right, #8b5cf6, #ea580c);
 color: var(--color-white);
 border-color: transparent;
}

/* — Pulse animation ( animate-pulse) — — — — — — — — — — — — —
 Utility genérica (sirve para badges, icons, indicators). Misma curva
 : cubic-bezier(0.4, 0, 0.6, 1) infinite 2s. */

@keyframes av-pulse-keyframes {
 0%, 100% { opacity: 1; }
 50% { opacity: 0.5; }
}

.av-pulse {
 animation: av-pulse-keyframes 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ============================================================================
 * §49 ─── Av-Tag Guía Visual variants — interactive tag (extensión aditiva sobre
 * el av-tag legacy de §29 que sigue intacto para priority-* etc.)
 * ============================================================================
 *
 * Guía Visual Tag es un link interactivo: renderiza como <a> por default
 * (component || "a") con hover/focus/active states. En MudBlazor se mapea
 * a MudButton — éste renderiza como <a> cuando lleva Href= y como <button>
 * sin Href (cubre la sección Polymorphic del demo).
 *
 * Las variantes Guía Visual (filled / outlined / soft) son ADITIVAS sobre el
 * baseline `.av-tag` legacy (§29 — typography 12 px / 500 / 1 / 0.025em +
 * padding 4×8 que ya matchea exactamente el demo). Los modifiers nuevos:
 *
 * - .av-tag-filled → bg saturado del color + text white (default Guía Visual)
 * - .av-tag-outlined → border gray-300 + text del color; hover border-this
 * - .av-tag-soft → bg darker/7% + text darker; hover → bg darker + text white
 * - .av-tag-glow → shadow-soft tinted del --av-this (spec custom Guía Visual)
 *
 * Cero impacto sobre el av-tag legacy (priorities, av-tag--neutral/success/
 * primary etc.) — esos no llevan las clases nuevas y siguen pintando como
 * antes (pill 9999 px). Las variantes nuevas overridean el border-radius a
 * 4 px (rounded-sm Guía Visual default).
 *
 * Color chain — reusa `.av-color-{primary|secondary|info|success|warning|error}`
 * de §14.1 ext. Sin av-color-X cae al neutral palette Guía Visual (gray-150/
 * gray-900 / etc.).
 *
 * shadow-soft (custom Guía Visual, declarado en demo/src/styles/index.css):
 * 0px 0px 2px 0px rgba(...) , 0px 12px 24px -4px rgba(...)
 * Para glow con color tinted: substituir rgba(145,158,171,0.20) por
 * rgb(from var(--av-this) r g b / 0.50). El neutral usa shadow-lg gray-200/50.
 * ============================================================================ */

/* — Reset Guía Visual radius default sobre las variantes nuevas (rounded-sm 4px). */

.av-tag.av-tag-filled.mud-button-root,
.av-tag.av-tag-outlined.mud-button-root,
.av-tag.av-tag-soft.mud-button-root {
 border-radius: 4px;
}

/* Mud reset compartido — sin altura fija, sin uppercase, sin text-decoration
 (el <a> que renderiza MudButton trae underline por default browser). */

.av-tag.av-tag-filled.mud-button-root,
.av-tag.av-tag-outlined.mud-button-root,
.av-tag.av-tag-soft.mud-button-root {
 padding: 4px 8px;
 height: auto;
 min-height: 0;
 text-decoration: none;
 transition:
 background-color 150ms ease,
 border-color 150ms ease,
 color 150ms ease,
 box-shadow 150ms ease;
}

/* — Variant filled — bg-this text-white hover:bg-this-darker active:bg-this-darker/90 */

.av-tag.av-tag-filled.mud-button-root {
 background-color: var(--av-this, var(--color-gray-150));
 color: var(--color-white);
 border: 1px solid transparent;
}
.av-tag.av-tag-filled.mud-button-root:hover,
.av-tag.av-tag-filled.mud-button-root:focus {
 background-color: var(--av-this-darker, var(--color-gray-200));
}
.av-tag.av-tag-filled.mud-button-root:active {
 background-color: rgb(from var(--av-this-darker, var(--color-gray-200)) r g b / 0.90);
}

/* Neutral filled — bg-gray-150 + text-gray-900 light · surface-2/dark-100 dark. */
.av-tag.av-tag-filled:not([class*="av-color-"]).mud-button-root {
 color: var(--color-gray-900);
}
html.dark .av-tag.av-tag-filled:not([class*="av-color-"]).mud-button-root {
 background-color: var(--surface-2);
 color: var(--color-dark-100);
}
html.dark .av-tag.av-tag-filled:not([class*="av-color-"]).mud-button-root:hover,
html.dark .av-tag.av-tag-filled:not([class*="av-color-"]).mud-button-root:focus {
 background-color: var(--surface-1);
}

/* — Variant outlined — border-gray-300 + text-this; hover border-this. */

.av-tag.av-tag-outlined.mud-button-root {
 background-color: transparent;
 color: var(--av-this, var(--color-gray-800));
 border: 1px solid var(--color-gray-300);
}
.av-tag.av-tag-outlined.mud-button-root:hover,
.av-tag.av-tag-outlined.mud-button-root:focus {
 border-color: var(--av-this, var(--color-gray-800));
}
html.dark .av-tag.av-tag-outlined.mud-button-root {
 color: var(--av-this-lighter, var(--color-dark-100));
 border-color: rgb(from var(--av-this-lighter, var(--surface-2)) r g b / 0.30);
}
html.dark .av-tag.av-tag-outlined.mud-button-root:hover,
html.dark .av-tag.av-tag-outlined.mud-button-root:focus {
 border-color: var(--av-this-lighter, var(--color-dark-100));
}

/* Neutral outlined — border-gray-300 + text-gray-800; hover border-gray-800. */
.av-tag.av-tag-outlined:not([class*="av-color-"]).mud-button-root {
 color: var(--color-gray-800);
 border-color: var(--color-gray-300);
}
.av-tag.av-tag-outlined:not([class*="av-color-"]).mud-button-root:hover,
.av-tag.av-tag-outlined:not([class*="av-color-"]).mud-button-root:focus {
 border-color: var(--color-gray-800);
}
html.dark .av-tag.av-tag-outlined:not([class*="av-color-"]).mud-button-root {
 color: var(--color-dark-100);
 border-color: var(--surface-2);
}
html.dark .av-tag.av-tag-outlined:not([class*="av-color-"]).mud-button-root:hover,
html.dark .av-tag.av-tag-outlined:not([class*="av-color-"]).mud-button-root:focus {
 border-color: var(--color-dark-100);
}

/* — Variant soft — bg darker/7% + text darker; HOVER → bg darker + text white
 (esto distingue Tag de Badge — Tag soft hover se convierte en filled). */

.av-tag.av-tag-soft.mud-button-root {
 background-color: rgb(from var(--av-this-darker, var(--color-gray-300)) r g b / 0.07);
 color: var(--av-this-darker, var(--color-gray-900));
 border: 1px solid transparent;
}
.av-tag.av-tag-soft.mud-button-root:hover,
.av-tag.av-tag-soft.mud-button-root:focus {
 background-color: var(--av-this-darker, var(--color-gray-200));
 color: var(--color-white);
}
html.dark .av-tag.av-tag-soft.mud-button-root {
 background-color: rgb(from var(--av-this-lighter, var(--color-dark-500)) r g b / 0.13);
 color: var(--av-this-lighter, var(--color-dark-100));
}
html.dark .av-tag.av-tag-soft.mud-button-root:hover,
html.dark .av-tag.av-tag-soft.mud-button-root:focus {
 background-color: var(--av-this, var(--color-dark-500));
 color: var(--color-white);
}

/* Neutral soft */
.av-tag.av-tag-soft:not([class*="av-color-"]).mud-button-root {
 background-color: rgb(from var(--color-gray-150) r g b / 0.10);
 color: var(--color-gray-900);
}
.av-tag.av-tag-soft:not([class*="av-color-"]).mud-button-root:hover,
.av-tag.av-tag-soft:not([class*="av-color-"]).mud-button-root:focus {
 background-color: var(--color-gray-150);
 color: var(--color-gray-900);
}
html.dark .av-tag.av-tag-soft:not([class*="av-color-"]).mud-button-root {
 background-color: rgb(from var(--color-dark-500) r g b / 0.10);
 color: var(--color-dark-100);
}
html.dark .av-tag.av-tag-soft:not([class*="av-color-"]).mud-button-root:hover,
html.dark .av-tag.av-tag-soft:not([class*="av-color-"]).mud-button-root:focus {
 background-color: var(--color-dark-500);
 color: var(--color-dark-100);
}

/* — Glow modifier (Guía Visual Tag isGlow — shadow-soft tinted del color) — — —
 shadow-soft spec (custom Guía Visual): rgba(145,158,171, 0.20) 0 0 2px 0 +
 rgba(145,158,171, 0.12) 0 12px 24px -4px. Tag substituye el color
 por shadow-this/50 → rgb(from --av-this r g b / 0.50). */

.av-tag.av-tag-glow.mud-button-root {
 box-shadow:
 0 0 2px 0 rgb(from var(--av-this, var(--color-gray-300)) r g b / 0.50),
 0 12px 24px -4px rgb(from var(--av-this, var(--color-gray-300)) r g b / 0.50);
}
html.dark .av-tag.av-tag-glow.mud-button-root {
 box-shadow:
 0 0 2px 0 rgb(from var(--av-this-lighter, var(--color-dark-450)) r g b / 0.50),
 0 12px 24px -4px rgb(from var(--av-this-lighter, var(--color-dark-450)) r g b / 0.50);
}

/* Neutral glow — shadow-lg gray-200/50 light · dark-450/50 dark (Guía Visual usa
 shadow-lg en neutral en vez de shadow-soft, igual que Badge). */
.av-tag.av-tag-glow:not([class*="av-color-"]).mud-button-root {
 box-shadow:
 0 10px 15px -3px rgb(from var(--color-gray-200) r g b / 0.50),
 0 4px 6px -4px rgb(from var(--color-gray-200) r g b / 0.50);
}
html.dark .av-tag.av-tag-glow:not([class*="av-color-"]).mud-button-root {
 box-shadow:
 0 10px 15px -3px rgb(from var(--color-dark-450) r g b / 0.50),
 0 4px 6px -4px rgb(from var(--color-dark-450) r g b / 0.50);
}

/* — Tag Group — wrapper que mergea bordes adyacentes. Guía Visual usa
 `ltr:rounded-r-none` / `ltr:rounded-l-none` por tag individual; aquí
 centralizamos en el wrapper para evitar repetir clases en cada hijo. */

.av-tag-group {
 display: inline-flex;
 flex-wrap: nowrap;
}

.av-tag-group > .mud-button-root:not(:first-child) {
 border-top-left-radius: 0 !important;
 border-bottom-left-radius: 0 !important;
}

.av-tag-group > .mud-button-root:not(:last-child) {
 border-top-right-radius: 0 !important;
 border-bottom-right-radius: 0 !important;
}

/* — Custom static variants — Guía Visual TagGroup §7 muestra 2 "unstyled" estáticas
 (Light = bg-gray-200, Dark = bg-dark-800). Específicas:
 padding: py-1.5 px-2 = 6 × 8 px (no las default 4 × 8 px del baseline).
 border-radius: rounded-sm = 4 px (no la pill 9999 px del baseline av-tag).
 Distintos de filled neutral porque son estáticos sin hover. */

.av-tag.av-tag-light.mud-button-root {
 background-color: var(--color-gray-200);
 color: var(--color-gray-900);
 border-color: transparent;
 padding: 6px 8px;
 border-radius: 4px;
}

.av-tag.av-tag-dark.mud-button-root {
 background-color: var(--color-dark-800);
 color: var(--color-white);
 border-color: transparent;
 padding: 6px 8px;
 border-radius: 4px;
}

/* — Size modifier av-tag-lg — Guía Visual Polymorphic demo usa px-5 py-2 (20×8 px)
 sobre un Tag outlined rounded-full. Opt-in para esa composición. */

.av-tag.av-tag-lg.mud-button-root {
 padding: 8px 20px;
}

/* ============================================================================
 * §51 ─── Av-Legend — color legend indicator (Guía Visual components/legend)
 * ============================================================================
 *
 * Patrón Guía Visual: <span class="inline-flex items-center space-x-2 leading-none">
 * con un dot circular + label de texto. Usado para indicar el significado de
 * colores en charts / dashboards / calendars / status lists.
 *
 * 3 variantes del demo:
 * 1. Basic Legend → dot 8 px filled (bg-this)
 * 2. Outlined Legend → dot 14 px con border-2 transparent bg
 * 3. Soft Color Legend → composición sobre Badge (reusa av-badge-soft + av-rounded-full)
 * con un dot interno bg-current
 *
 * Mapping a Blazor — primitive custom sobre <MudElement HtmlTag="span"> ya
 * que es un wrapper decorativo sin chrome necesario. Color chain compartido
 * con button/badge/tag/box/timeline (av-color-X de §14.1 ext).
 *
 * Markup esperado:
 *
 * <MudElement HtmlTag="span" Class="av-legend [av-legend--outlined] [av-color-X]">
 * <MudElement HtmlTag="span" Class="av-legend__dot" />
 * <MudElement HtmlTag="span">Label</MudElement>
 * </MudElement>
 *
 * Para Soft Color Legend, NO se usa av-legend wrapper — se compone sobre
 * av-badge-soft con un dot interno `av-legend__dot av-legend__dot--current`
 * que toma color del texto del badge (que ya lo aplica via av-badge-soft).
 * ============================================================================ */

.av-legend {
 display: inline-flex;
 align-items: center;
 gap: 8px;
 line-height: 1;
}

/* Container layout para múltiples Legend en columna (Basic / Outlined demo). */
.av-legend-stack {
 display: flex;
 flex-direction: column;
 gap: 16px;
}

/* Dot baseline — 8 px filled, consume --av-this. Sin av-color-X cae al
 neutral (gray-600 light / dark-200 dark). */

.av-legend__dot {
 display: inline-block;
 flex-shrink: 0;
 width: 8px;
 height: 8px;
 border-radius: 9999px;
 background-color: var(--av-this, var(--color-gray-600));
}

html.dark .av-legend__dot {
 background-color: var(--av-this-lighter, var(--color-dark-200));
}

/* Outlined variant — dot 14 px (size-3.5) con border-2 transparent bg. */

.av-legend.av-legend--outlined .av-legend__dot {
 width: 14px;
 height: 14px;
 background-color: transparent;
 border: 2px solid var(--av-this, var(--color-gray-300));
}

html.dark .av-legend.av-legend--outlined .av-legend__dot {
 background-color: transparent;
 border-color: var(--av-this-lighter, var(--color-dark-300));
}

/* Current-color variant — para dot dentro de av-badge-soft (Soft Color Legend).
 El badge ya aplica color: var(--av-this-darker), el dot lo hereda via
 currentColor. Sin border. */

.av-legend__dot.av-legend__dot--current {
 background-color: currentColor;
 border: none;
 width: 8px;
 height: 8px;
}

/* ============================================================================
 * §52 ─── Av-Input — MudTextField Guía Visual skin (Forms category)
 * ============================================================================
 *
 * El bridge §LAST-3 (mud-bridge.css) ya pinta el border state machine Guía Visual
 * en TODOS los .mud-input.mud-input-outlined (Normal/Hover/Focus/Error/Disabled
 * con tokens gray-300/400 + primary-600/500 + error). Por eso `av-input` NO
 * necesita re-declarar los borders — esos son globales.
 *
 * Lo que av-input aporta (opt-in via Class="av-input" en MudTextField):
 * - Sizes: --sm (32 px, text-xs) y --lg (48 px, text-base) — el default Mud
 * Margin.Dense ronda 40 px ≈ Guía Visual h-10 default.
 * - Rounded modifier: --rounded (border-radius 9999 px)
 * - Soft variant: --soft (bg gray-150 / dark-900 + sin border visible +
 * ring primary/50 en focus) — usado por Search y Custom unstyled del demo.
 * - Description text typography (cuando se usa HelperText sin Error)
 *
 * Para Prefix/Suffix usar MudTextField.Adornment (Mud-nativo). El bridge ya
 * tiene reglas de color para .mud-input-adornment.
 *
 * Mapping de la API Guía Visual ↔ MudTextField:
 * label → Label
 * placeholder → Placeholder
 * description → HelperText (cuando no hay Error)
 * error → Error + ErrorText
 * disabled → Disabled
 * type → InputType
 * prefix → Adornment="Adornment.Start" AdornmentIcon="@..."
 * suffix → Adornment="Adornment.End" + OnAdornmentClick para acciones
 * value/onChange → @bind-Value
 * component={Cleave} options={...} → Mask="@(new PatternMask/DateMask/...)"
 * ============================================================================ */

/* — Size modifier --sm (h-8 32 px + text-xs 12 px) — Guía Visual InputSizes small.
 Mud calcula la altura del .mud-input-control desde un mix de min-height del
 .mud-input + padding del .mud-input-input. Override ambos. */

.av-input.av-input--sm .mud-input.mud-input-outlined {
 min-height: 32px;
}
.av-input.av-input--sm .mud-input-input {
 padding-top: 4px !important;
 padding-bottom: 4px !important;
 font-size: 12px !important;
 line-height: 1.4;
}

/* — Size modifier --lg (h-12 48 px + text-base 16 px) — Guía Visual InputSizes large. */

.av-input.av-input--lg .mud-input.mud-input-outlined {
 min-height: 48px;
}
.av-input.av-input--lg .mud-input-input {
 padding-top: 12px !important;
 padding-bottom: 12px !important;
 font-size: 16px !important;
 line-height: 1.4;
}

/* — Rounded modifier — Guía Visual Custom usa rounded-full sobre el input.
 MISMO patrón de fix que av-input--in-group-{X} (§53): el bridge §66 pone
 radius-lg via `.mud-input-control .mud-input-outlined-border` (0,2,0 +
 !important) Y MudBlazor.min.css declara `.mud-input.mud-input-outlined
 .mud-input-outlined-border` (0,3,0 sin !important). Para batirlos en idle
 Y focus:
 - Specificity bumped a 0,5,0 via chain `.av-input.av-input--rounded
 .mud-input.mud-input-outlined .mud-input-outlined-border`.
 - Border-radius shorthand (no individual corner) para reemplazar el
 shorthand del bridge en su totalidad.
 - overflow: hidden defensivo sobre el wrapper interno — recorta cualquier
 elemento descendiente con radius propio al shape rounded-full. */

.av-input.av-input--rounded .mud-input.mud-input-outlined,
.av-input.av-input--rounded .mud-input.mud-input-outlined .mud-input-outlined-border,
.av-input.av-input--rounded .mud-input-slot.mud-input-root-outlined,
.av-input.av-input--rounded .mud-input-input,
.av-input.av-input--rounded > input,
.av-input.av-input--rounded input.mud-input-root {
 border-radius: 9999px !important;
}

.av-input.av-input--rounded .mud-input.mud-input-outlined {
 overflow: hidden;
}

/* Padding extra para que el texto no choque con el radius — Guía Visual usa
 px-3 (12 px) en su rounded-full pero visualmente sumamos un poco. */
.av-input.av-input--rounded .mud-input-input {
 padding-left: 16px !important;
 padding-right: 16px !important;
}

/* — Soft variant — Guía Visual Search/Custom usan `unstyled bg-gray-150 ring-primary/50
 focus:ring-3`. Sin border, con bg tinted + ring expansivo en focus. */

.av-input.av-input--soft .mud-input.mud-input-outlined {
 background-color: var(--color-gray-150);
 border-radius: 8px;
}
html.dark .av-input.av-input--soft .mud-input.mud-input-outlined {
 background-color: var(--color-dark-900);
}

/* Suprimir el outlined-border del bridge — soft no tiene border visible. */
.av-input.av-input--soft .mud-input-outlined-border {
 border-color: transparent !important;
}

/* Ring en focus — 3 px primary-500 al 50% ( ring-3 + ring-primary-500/50). */
.av-input.av-input--soft .mud-input.mud-input-outlined:focus-within {
 box-shadow: 0 0 0 3px rgb(from var(--color-primary-500) r g b / 0.50);
}

/* Placeholder color — Guía Visual usa gray-400 light / dark-200 al 70%. */
.av-input.av-input--soft .mud-input-input::placeholder {
 color: var(--color-gray-400);
 opacity: 1;
}
html.dark .av-input.av-input--soft .mud-input-input::placeholder {
 color: rgb(from var(--color-dark-200) r g b / 0.70);
}

/* — Description / HelperText typography — Guía Visual usa text-xs (12 px) +
 text-gray-400 / dark-300 + margin-top 4 px (mt-1). El bridge ya hace
 close-enough pero pulimos para matchear pixel-perfect. */

.av-input .mud-input-helper-text {
 font-size: 12px;
 color: var(--color-gray-400);
 margin-top: 4px;
}
html.dark .av-input .mud-input-helper-text {
 color: var(--color-dark-300);
}

/* — InputType.Search browser-native clear (X) — Chromium/WebKit muestran un
 ícono X nativo cuando el input tiene value. Lo ocultamos para evitar
 conflicto visual con nuestro Adornment.End custom (Guía Visual pattern). */

.av-input .mud-input-input[type="search"]::-webkit-search-cancel-button,
.av-input .mud-input-input[type="search"]::-webkit-search-decoration {
 -webkit-appearance: none;
 appearance: none;
 display: none;
}

/* ============================================================================
 * §53 ─── Av-Input-Group — Guía Visual InputGroup (Prepend/Append/Between/Filled/Advanced)
 * ============================================================================
 *
 * Patrón Guía Visual: flex container con `-space-x-px` (margin-left -1 px en
 * adyacentes) para mergear los bordes; cada Input adyacente al addon lleva
 * `rounded-X-none` en el lado del addon para visualmente fusionar.
 *
 * Mapping a Blazor — wrapper via `MudElement HtmlTag="div"` (no MudStack
 * porque su gap por default no soporta el negative-margin pattern de Guía Visual
 * sin pelearle). Addon decorativo via `MudElement HtmlTag="div"` también
 * (no MudPaper porque trae shadow/elevation que pelearíamos).
 *
 * Markup esperado:
 *
 * <MudElement HtmlTag="div" Class="av-input-group">
 * <MudElement HtmlTag="div" Class="av-input-addon [av-input-addon--filled]">@</MudElement>
 * <MudTextField Class="av-input av-input--in-group av-input--in-group-end" ... />
 * </MudElement>
 *
 * Modifiers de posición sobre el input dentro del grupo:
 * --in-group-end → border-top-right + border-bottom-right cero (addon a la derecha)
 * --in-group-start → border-top-left + border-bottom-left cero (addon a la izquierda)
 * --in-group-both → ambos lados cero (input rodeado de addons)
 * ============================================================================ */

.av-input-group {
 display: flex;
 flex-wrap: nowrap;
 align-items: center; /* alineación vertical center — los addons NO se
 estiran al tamaño del wrapper Mud (que reserva
 espacio para helper text aunque no exista). */
 max-width: 100%;
}

/* Negative margin para que los bordes adyacentes se fusionen visualmente
 (Guía Visual -space-x-px = margin-left -1 px en los hijos no-primeros). */
.av-input-group > *:not(:first-child) {
 margin-inline-start: -1px;
}

/* Suprimir el espacio reservado del helper-text en inputs dentro de grupos
 (Mud lo reserva por default incluso cuando no hay HelperText). Sin esto
 el .mud-input-control queda más alto que el border visible y los addons
 no alinean. */
.av-input-group .mud-input-helper-text {
 display: none;
}

/* — Addon decorativo — Guía Visual: <div class="border bg px-3.5 ...">. Spec:
 - height: 40 px (matchea Mud Dense default input border altura visible)
 - padding inline: 14 px (px-3.5 )
 - border: 1px gray-300 / dark-450 (matchea borders del input via bridge)
 - bg: white (light, transparent) / dark-paper (dark) — neutral default
 - text: gray-800 / dark-100 + line-height 1 (leading-none)
 - radius: 0 en el centro (controla el wrapper via :first-child / :last-child) */

.av-input-addon {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 flex-shrink: 0;
 height: 42px; /* matchea altura visible del MudTextField
 Margin.Dense Outlined: padding 10.5 px + line 1.4 *
 14 px font ≈ 42 px (verificado con DevTools). */
 padding: 0 14px;
 border: 1px solid var(--color-gray-300);
 background-color: var(--color-white);
 color: var(--color-gray-800);
 line-height: 1;
 font-family: var(--font-sans);
 font-size: 14px;
 border-radius: 0;
 box-sizing: border-box;
}

html.dark .av-input-addon {
 border-color: var(--color-dark-450);
 background-color: var(--surface-3, var(--color-dark-700));
 color: var(--color-dark-100);
}

/* Filled variant — bg gray-150 (light) / dark-500 (dark) — Guía Visual Filled. */
.av-input-addon.av-input-addon--filled {
 background-color: var(--color-gray-150);
}
html.dark .av-input-addon.av-input-addon--filled {
 background-color: var(--color-dark-500);
}

/* Esquinas — addon como primer hijo del grupo: radius solo en lado izquierdo.
 Addon como último hijo: radius solo en lado derecho. Si es addon central
 (between), ambos lados a 0. */

.av-input-group > .av-input-addon:first-child {
 border-top-left-radius: 8px;
 border-bottom-left-radius: 8px;
}
.av-input-group > .av-input-addon:last-child {
 border-top-right-radius: 8px;
 border-bottom-right-radius: 8px;
}

/* Inputs / buttons dentro del grupo — radius condicional. Modifiers
 `av-input--in-group-{end|start|both}` son primitive-agnostic: aplican
 sobre MudTextField (via descendant selectors al .mud-input + outlined-border
 + slot + input element) Y sobre MudButton (via .mud-button-root + :not(.mud-fab)
 — matchea la specificity del bridge §62 que pone radius-lg en todo MudButton).

 IMPORTANTE — usar `border-radius` shorthand (4 corners explícitos) en vez
 de `border-top-right-radius: 0` individual. Razón: el bridge §66 declara
 `border-radius: var(--radius-lg) !important` shorthand sobre los mismos
 selectores. Si solo overrideáramos 2 corners individuales, el resto del
 shorthand del bridge sigue activo. Forzando los 4 corners explícitos
 garantizamos el override en idle Y focus states. */

/* in-group-end → radius derecho cero (input/button al inicio del grupo, addon a la derecha).
 Shorthand corners: top-left top-right bottom-right bottom-left = 8 0 0 8.
 Specificity bumped a 0,3,0+ via doble-class .av-input.av-input--in-group-end y
 chain .mud-input.mud-input-outlined para batir MudBlazor.min.css §`.mud-input.mud-input-outlined .mud-input-outlined-border` (0,3,0) en idle Y focus state. */
.av-input.av-input--in-group-end .mud-input.mud-input-outlined,
.av-input.av-input--in-group-end .mud-input.mud-input-outlined .mud-input-outlined-border,
.av-input.av-input--in-group-end .mud-input-slot.mud-input-root-outlined,
.av-input.av-input--in-group-end .mud-input-input,
.av-input.av-input--in-group-end > input,
.av-input.av-input--in-group-end input.mud-input-root,
.av-input--in-group-end.mud-button-root:not(.mud-fab),
.av-input--in-group-end.mud-icon-button-root {
 border-radius: 8px 0 0 8px !important;
}

/* in-group-start → radius izquierdo cero (addon a la izquierda, input/button al final).
 Shorthand corners: 0 8 8 0. */
.av-input.av-input--in-group-start .mud-input.mud-input-outlined,
.av-input.av-input--in-group-start .mud-input.mud-input-outlined .mud-input-outlined-border,
.av-input.av-input--in-group-start .mud-input-slot.mud-input-root-outlined,
.av-input.av-input--in-group-start .mud-input-input,
.av-input.av-input--in-group-start > input,
.av-input.av-input--in-group-start input.mud-input-root,
.av-input--in-group-start.mud-button-root:not(.mud-fab),
.av-input--in-group-start.mud-icon-button-root {
 border-radius: 0 8px 8px 0 !important;
}

/* in-group-both → todos los corners cero (input rodeado de addons en ambos lados). */
.av-input.av-input--in-group-both .mud-input.mud-input-outlined,
.av-input.av-input--in-group-both .mud-input.mud-input-outlined .mud-input-outlined-border,
.av-input.av-input--in-group-both .mud-input-slot.mud-input-root-outlined,
.av-input.av-input--in-group-both .mud-input-input,
.av-input.av-input--in-group-both > input,
.av-input.av-input--in-group-both input.mud-input-root,
.av-input--in-group-both.mud-button-root:not(.mud-fab),
.av-input--in-group-both.mud-icon-button-root {
 border-radius: 0 !important;
}

/* — Clip defensivo — sobre el wrapper interno .mud-input.mud-input-outlined
 apply overflow: hidden para que CUALQUIER elemento interno (input slot,
 <input> raw, legend, etc.) que tenga border-radius propio quede recortado
 al rectangular shape definido por nuestros modifiers in-group-*. Es la red
 de seguridad contra futuros cambios de Mud que añadan radius en algún layer
 interno. NO afecta floating label porque éste vive en .mud-input-control
 (outer) — Mud lo renderea fuera del .mud-input-outlined. */
.av-input.av-input--in-group-end .mud-input.mud-input-outlined,
.av-input.av-input--in-group-start .mud-input.mud-input-outlined,
.av-input.av-input--in-group-both .mud-input.mud-input-outlined {
 overflow: hidden;
}

/* Hover/focus z-index — Guía Visual usa `hover:z-1 focus:z-1` para que el borde
 resaltado quede sobre el adyacente. */
.av-input-group .av-input:hover,
.av-input-group .av-input:focus-within {
 z-index: 1;
 position: relative;
}

/* Inputs dentro del grupo crecen (flex-1 en Guía Visual). */
.av-input-group > .av-input {
 flex: 1 1 0;
 min-width: 0;
}

/* Botones dentro del grupo — altura 42 px (matchea altura real del MudTextField
 Margin.Dense Outlined + altura del av-input-addon). Sin esto el MudButton
 default (36 px) queda más bajo que el input visible. */
.av-input-group > .mud-button-root:not(.mud-fab) {
 height: 42px !important;
}

/* ============================================================================
 * §54 ─── Av-Collapse — Guía Visual Collapse variants (modifiers sobre MudCollapse)
 * ============================================================================
 *
 * MudCollapse no expone parámetros para transition-duration / timing-function /
 * min-height-on-collapsed. Estos modifiers opt-in setean esos valores via
 * override CSS sobre el `.mud-collapse-container` interno.
 *
 * Modifiers (todos opt-in, aplican via Class="av-collapse--X" en MudCollapse):
 * - .av-collapse--duration-{N} → transition-duration: Nms (override del default Mud 300ms)
 * - .av-collapse--ease-elastic → cubic-bezier(0.175, 0.885, 0.320, 1.275) (Guía Visual TimingFunction demo)
 * - .av-collapse--min-h-{N} → min-height: Npx (visible cuando collapsed; matchea `min` prop Guía Visual)
 *
 * Selector chain: .av-collapse--X .mud-collapse-container (0,2,0). El Mud
 * default usa estilo inline en `height` (alta specificity) PERO los modifiers
 * acá usan `transition-*` y `min-height` — props distintos, sin conflicto
 * de cascada.
 *
 * Mapping a Guía Visual Collapse API:
 * in → Expanded (bool)
 * transitionDuration → av-collapse--duration-{N}
 * transitionTimingFunction → av-collapse--ease-{name}
 * min → av-collapse--min-h-{N}
 * onTransitionEnd → OnAnimationEnd (Mud event, mismo concepto)
 * component={ScrollShadow} → wrap content en MudPaper + av-scroll-shadow (§46)
 * ============================================================================ */

.av-collapse--duration-2000 .mud-collapse-container,
.av-collapse--duration-2000 .mud-collapse-wrapper,
.av-collapse--duration-2000 .mud-collapse-wrapper-inner {
 transition-duration: 2000ms;
}

.av-collapse--ease-elastic .mud-collapse-container,
.av-collapse--ease-elastic .mud-collapse-wrapper,
.av-collapse--ease-elastic .mud-collapse-wrapper-inner {
 transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.275);
}

/* Min-height visible cuando collapsed. Mud setea height: 0 inline al colapsar;
 min-height vía CSS resulta en max(0, min-height) = min-height. */
.av-collapse--min-h-20 .mud-collapse-container {
 min-height: 20px;
}
.av-collapse--min-h-80 .mud-collapse-container {
 min-height: 80px;
}

/* ============================================================================
 * §55 ─── Av-Progress — Guía Visual Progress over MudProgressLinear
 * ============================================================================
 *
 * MudProgressLinear renderiza:
 * <div class="mud-progress-linear mud-progress-color-X">
 * <div class="mud-progress-linear-bars">
 * <div class="mud-progress-linear-bar mud-progress-color-X" style="transform: scaleX(0.4)"/>
 * </div>
 * </div>
 *
 * Guía Visual Progress (8 variantes — default / basic / soft / sizes / active /
 * indeterminate / customizer / custom) usa colores semánticos distintos al
 * MudTheme. Override via clase opt-in `av-progress` + color chain av-color-X.
 *
 * Mapping a Mud:
 * value → MudProgressLinear Value (0-100)
 * color → av-color-X (Guía Visual palette) en vez de Mud Color enum
 * variant="soft" → modifier av-progress--soft (rail tinted)
 * isActive → modifier av-progress--active (white overlay slide animation)
 * isIndeterminate → MudProgressLinear Indeterminate=true (Mud-native)
 * className h-N → modifiers av-progress--h-{1|4|6}
 *
 * MudProgressLinear default usa Color="Color.Default" → gris. Cuando aplica
 * Color="Color.Primary/etc", Mud usa --mud-palette-X (theme). Para Guía Visual
 * palette pura, el showcase usa Color="Color.Default" + clase av-color-X
 * que overridea via --av-this.
 * ============================================================================ */

/* Active sweep — animado via background-position (no via ::before transform,
 que conflictúa con el `transform: scaleX(value)` de Mud sobre el bar). */
@keyframes av-progress-active-sweep {
 0% { background-position: -150% 0; opacity: 0.6; }
 100% { background-position: 150% 0; opacity: 0; }
}

/* Rail neutral default — gray-150 light, dark-500 dark. Height 8 px matchea
 Guía Visual h-2 (default). Override de Mud's `.mud-progress-linear.horizontal.mud-progress-linear-medium`
 que tiene height: 8 px sin !important — mismo valor pero forzado para que sizes modifiers ganen.
 IMPORTANTE: Specificity 0,2,0 + !important sobre todas las propiedades clave
 para vencer la cadena de selectores compuestos de Mud (.mud-progress-linear.horizontal.mud-progress-linear-X). */

.av-progress.mud-progress-linear {
 background-color: var(--color-gray-150) !important;
 border-radius: 9999px !important;
 overflow: hidden !important;
 height: 8px !important;
}
html.dark .av-progress.mud-progress-linear {
 background-color: var(--color-dark-500) !important;
}

/* Bar neutral default — gray-500 light, dark-400 dark. */
.av-progress.mud-progress-linear .mud-progress-linear-bar {
 background-color: var(--color-gray-500) !important;
 border-radius: 9999px !important;
}
html.dark .av-progress.mud-progress-linear .mud-progress-linear-bar {
 background-color: var(--color-dark-400) !important;
}

/* Color override via av-color-X chain (§14.1 ext). Pinta el bar con --av-this. */
.av-progress[class*="av-color-"].mud-progress-linear .mud-progress-linear-bar {
 background-color: var(--av-this) !important;
}
html.dark .av-progress[class*="av-color-"].mud-progress-linear .mud-progress-linear-bar {
 background-color: var(--av-this-lighter) !important;
}

/* Soft variant — rail tinted con --av-this/15% en light, lighter/25% en dark.
 El bar mantiene el color saturado del av-color-X. */
.av-progress.av-progress--soft.mud-progress-linear {
 background-color: rgb(from var(--av-this) r g b / 0.15) !important;
}
html.dark .av-progress.av-progress--soft.mud-progress-linear {
 background-color: rgb(from var(--av-this-lighter) r g b / 0.25) !important;
}

/* Height modifiers ( h-N = N * 4 px). Default Mud Progress = 8 px.
 Specificity 0,2,0 + !important para batir el chain
 `.mud-progress-linear.horizontal.mud-progress-linear-medium` (0,3,0 sin !important). */
.av-progress.av-progress--h-1.mud-progress-linear { height: 4px !important; }
.av-progress.av-progress--h-4.mud-progress-linear { height: 16px !important; }
.av-progress.av-progress--h-6.mud-progress-linear { height: 24px !important; }

/* Active state — white sliding overlay vía background-image gradient + animation
 sobre background-position. NO usar ::before porque el bar tiene
 `transform: scaleX(value)` aplicado por Mud y el ::before heredaría el scale,
 destruyendo la animación translateX. Background-image es independiente del
 transform. */
.av-progress.av-progress--active.mud-progress-linear .mud-progress-linear-bar {
 background-image: linear-gradient(
 90deg,
 transparent 0%,
 rgb(from var(--color-white) r g b / 0.85) 50%,
 transparent 100%
 ) !important;
 background-size: 50% 100% !important;
 background-repeat: no-repeat !important;
 animation: av-progress-active-sweep 2s cubic-bezier(0.55, 0.2, 0.3, 0.67) infinite !important;
}

/* Custom variant — bg-linear-gradient utilities (paletas demo Guía Visual Custom).
 Override completo del bar bg via `background:` shorthand + !important. */
.av-progress.av-progress--gradient-secondary-info.mud-progress-linear .mud-progress-linear-bar {
 background: linear-gradient(to right, #ff75df, var(--color-info)) !important;
}
.av-progress.av-progress--gradient-lime.mud-progress-linear {
 background-color: rgb(from #84cc16 r g b / 0.20) !important;
}
.av-progress.av-progress--gradient-lime.mud-progress-linear .mud-progress-linear-bar {
 background-color: #84cc16 !important;
 background-image: none !important;
}

/* Squared corners modifier (Guía Visual Custom 2da variante usa rounded-bl-none rounded-tr-none) */
.av-progress.av-progress--squared-tr-bl.mud-progress-linear,
.av-progress.av-progress--squared-tr-bl.mud-progress-linear .mud-progress-linear-bar {
 border-bottom-left-radius: 0 !important;
 border-top-right-radius: 0 !important;
}

/* ============================================================================
 * §56 ─── Av-Circlebar — Guía Visual Circlebar over MudProgressCircular
 * ============================================================================
 *
 * MudProgressCircular renderiza:
 * <div class="mud-progress-circular ...">
 * <svg viewBox="22 22 44 44">
 * <circle class="mud-progress-circular-circle" cx="44" cy="44" r="20" stroke-width="3"/>
 * </svg>
 * </div>
 *
 * Mud NO renderiza rail (track) por default — solo el progress arc. Aproximamos
 * el rail via ::before pseudo-elemento con border-radius 50% + border de color
 * gris (matchea Guía Visual rail neutral).
 *
 * Mapping a Mud:
 * value → MudProgressCircular Value (0-100)
 * strokeWidth → MudProgressCircular StrokeWidth (Mud-native ✓)
 * strokeLinecap → CSS override `stroke-linecap` en .mud-progress-circular-circle
 * isActive → modifier av-circlebar--active (no implementable pixel-perfect; placeholder)
 * isIndeterminate → MudProgressCircular Indeterminate=true ✓
 * offsetDegree → CSS transform: rotate(Xdeg) sobre el SVG
 * gapDegree → stroke-dasharray con calc gap (aproximación)
 * size (Guía Visual N) → CSS width/height (N/4 rem)
 * variant="soft" → modifier av-circlebar--soft (rail tinted)
 * variant="gradient"→ no implementable con MudProgressCircular (stroke debe ser url(#gradient));
 * skip pixel-perfect, mostrar solid color como fallback
 *
 * Limitaciones documentadas en showcase: Gradient variant NO se logra pixel-perfect
 * con MudProgressCircular como base (requeriría SVG defs + linearGradient en el
 * <circle>). Se demuestra solid color en su lugar.
 * ============================================================================ */

/* Container — relative para anclar el rail ::before. Default size 6 rem (96 px)
 matchea Guía Visual <Circlebar /> default `size = 24` (24/4 rem). Mud's default
 .mud-progress-medium (40 px) hay que batirlo con !important. */
.av-circlebar.mud-progress-circular {
 position: relative;
 width: 6rem !important;
 height: 6rem !important;
}

/* Rail neutral — pseudo-element circle detrás del arc. Border-width default 6 px
 matchea Guía Visual strokeWidth default = 6. Si el consumer cambia StrokeWidth,
 debe combinar con av-circlebar--stroke-N para sincronizar rail. */
.av-circlebar.mud-progress-circular::before {
 content: "";
 position: absolute;
 inset: 0;
 border-radius: 50%;
 border: 6px solid var(--color-gray-150);
 box-sizing: border-box;
 pointer-events: none;
}
html.dark .av-circlebar.mud-progress-circular::before {
 border-color: var(--color-dark-500);
}

/* Stroke color override via av-color-X chain (consume --av-this). */
.av-circlebar[class*="av-color-"].mud-progress-circular .mud-progress-circular-circle {
 stroke: var(--av-this) !important;
}
html.dark .av-circlebar[class*="av-color-"].mud-progress-circular .mud-progress-circular-circle {
 stroke: var(--av-this-lighter) !important;
}

/* Soft variant — rail tinted con --av-this/15%. */
.av-circlebar.av-circlebar--soft.mud-progress-circular::before {
 border-color: rgb(from var(--av-this) r g b / 0.15) !important;
}
html.dark .av-circlebar.av-circlebar--soft.mud-progress-circular::before {
 border-color: rgb(from var(--av-this-lighter) r g b / 0.20) !important;
}

/* Stroke linecap — Guía Visual default `strokeLinecap = "round"`. Mud solo aplica
 `stroke-linecap: round` cuando el consumer pasa Rounded="true" (clase
 .mud-progress-circular-circle-rounded). Default Mud sin Rounded → butt
 (cortes rectos). Forzamos round en todos los av-circlebar para matchear
 Guía Visual pixel-perfect; el modifier --linecap-square override a square. */
.av-circlebar.mud-progress-circular .mud-progress-circular-circle {
 stroke-linecap: round;
}
.av-circlebar.av-circlebar--linecap-square.mud-progress-circular .mud-progress-circular-circle {
 stroke-linecap: square !important;
}

/* Rail border-width sync con stroke-width custom — Mud StrokeWidth param afecta
 el arc, pero el rail (::before) es fijo a 3 px por default. Si el consumer
 usa StrokeWidth distinto, debe combinar con un modifier av-circlebar--stroke-N.
 !important para batir el border: 3px solid en la regla base con doble-clase. */
.av-circlebar.av-circlebar--stroke-2.mud-progress-circular::before { border-width: 2px !important; }
.av-circlebar.av-circlebar--stroke-4.mud-progress-circular::before { border-width: 4px !important; }
.av-circlebar.av-circlebar--stroke-6.mud-progress-circular::before { border-width: 6px !important; }
.av-circlebar.av-circlebar--stroke-8.mud-progress-circular::before { border-width: 8px !important; }
.av-circlebar.av-circlebar--stroke-12.mud-progress-circular::before { border-width: 12px !important; }

/* Size modifiers (Guía Visual size=N → N/4 rem). Mud's default
 `.mud-progress-circular.mud-progress-medium` (specificity 0,2,0) pinta width/
 height 40 px. Para batirlo, doble-clase + !important. */
.av-circlebar.av-circlebar--size-12.mud-progress-circular { width: 3rem !important; height: 3rem !important; }
.av-circlebar.av-circlebar--size-16.mud-progress-circular { width: 4rem !important; height: 4rem !important; }
.av-circlebar.av-circlebar--size-20.mud-progress-circular { width: 5rem !important; height: 5rem !important; }
.av-circlebar.av-circlebar--size-24.mud-progress-circular { width: 6rem !important; height: 6rem !important; }
.av-circlebar.av-circlebar--size-28.mud-progress-circular { width: 7rem !important; height: 7rem !important; }
.av-circlebar.av-circlebar--size-32.mud-progress-circular { width: 8rem !important; height: 8rem !important; }

/* OffsetDegree — rotación del SVG entero. !important porque Mud aplica transform
 en el SVG para indeterminate animation. */
.av-circlebar--offset-90.mud-progress-circular .mud-progress-circular-svg { transform: rotate(90deg) !important; }
.av-circlebar--offset-180.mud-progress-circular .mud-progress-circular-svg { transform: rotate(180deg) !important; }
.av-circlebar--offset-270.mud-progress-circular .mud-progress-circular-svg { transform: rotate(270deg) !important; }

/* GapDegree (aproximación) — stroke-dasharray con gap visible. El Mud
 default arc usa stroke-dasharray para dibujar el value. Si overrideáramos
 completo, romperíamos el value display. Para showcase mostramos el efecto
 visual via rail con dasharray.

 Calc: circumference = 2*π*r ≈ 2*π*20 = 125.66. Para gap de 75deg:
 gap_arc = 125.66 * (75/360) = 26.18. */
.av-circlebar.av-circlebar--gap-75.mud-progress-circular::before {
 border: none !important;
 background:
 conic-gradient(from 217.5deg, var(--color-gray-150) 0 285deg, transparent 285deg 360deg) !important;
 mask: radial-gradient(circle, transparent 60%, black 60%);
 -webkit-mask: radial-gradient(circle, transparent 60%, black 60%);
}
html.dark .av-circlebar.av-circlebar--gap-75.mud-progress-circular::before {
 background:
 conic-gradient(from 217.5deg, var(--color-dark-500) 0 285deg, transparent 285deg 360deg) !important;
}

/* Gradient variant — MudProgressCircular's <circle> stroke no soporta SVG
 gradient via CSS directo. Aproximamos con solid color (midpoint del gradient
 demo). Pixel-perfect requeriría SVG <defs><linearGradient> que MudProgressCircular
 no inyecta. Documentado como limitación en showcase. */
.av-circlebar--gradient-rose-green.mud-progress-circular .mud-progress-circular-circle {
 stroke: #f97316 !important; /* approximation: midpoint del rose→green */
}
.av-circlebar--gradient-amber-cyan.mud-progress-circular .mud-progress-circular-circle {
 stroke: #06b6d4 !important; /* approximation: cyan side */
}
.av-circlebar--gradient-cyan-fuchsia.mud-progress-circular .mud-progress-circular-circle {
 stroke: #d946ef !important; /* approximation: fuchsia side */
}
.av-circlebar--gradient-rose-violet.mud-progress-circular .mud-progress-circular-circle {
 stroke: #8b5cf6 !important; /* approximation: violet side */
}

/* Custom modifier — outer container con bg gradient + circlebar override stroke white. */
.av-circlebar.av-circlebar--on-dark.mud-progress-circular::before {
 border-color: rgb(from var(--color-white) r g b / 0.20) !important;
}
.av-circlebar.av-circlebar--on-dark.mud-progress-circular .mud-progress-circular-circle {
 stroke: rgb(from var(--color-white) r g b / 0.80) !important;
}

/* ── Custom card primitivas (sec 13 del demo Guía Visual) ──
 Guía Visual usa `px-4 pb-4 pt-5` (asimétrico) + `mx-8` interior + button "unstyled"
 con bg-white/20 + border-white/10. Modifiers dedicados para evitar
 inline-style en el showcase. */
.av-circlebar-card.mud-paper {
 padding: 20px 16px 16px 16px !important; /* pt-5 = 20px, px-4 = 16px, pb-4 = 16px */
 border-radius: var(--radius-lg) !important;
 text-align: center;
}
.av-circlebar-card__circle-wrap {
 margin: 0 32px; /* Guía Visual mx-8 = 32px lateral interno */
}
.av-circlebar-card__label.mud-typography {
 margin-top: 12px; /* mt-3 */
 color: inherit;
 font-weight: 600;
}
/* Unstyled white-on-white button (Guía Visual <Button unstyled className="...">) */
.av-circlebar-card__btn.mud-button-root {
 margin-top: 20px !important; /* mt-5 */
 width: 100%;
 border-radius: var(--radius-lg) !important;
 border: 1px solid rgb(from var(--color-white) r g b / 0.10) !important;
 background-color: rgb(from var(--color-white) r g b / 0.20) !important;
 color: var(--color-white) !important;
 padding: 8px 0 !important; /* py-2 */
 font-weight: 500;
 text-transform: none;
 box-shadow: none !important;
}
.av-circlebar-card__btn.mud-button-root:hover,
.av-circlebar-card__btn.mud-button-root:focus {
 background-color: rgb(from var(--color-white) r g b / 0.30) !important;
}

/* ============================================================================
 * §57 ─── MudTooltip — Guía Visual Tooltip skin (GLOBAL, no opt-in)
 * ============================================================================
 *
 * MudTooltip renderiza:
 * <div class="mud-tooltip mud-tooltip-default mud-tooltip-top-center"> texto </div>
 *
 * El popover sale portalado al body, así que no podemos targetearlo via
 * descendant selector desde un wrapper class. Mud no expone .Class de manera
 * confiable sobre el popover (Class va al wrapper trigger, RootClass también).
 * Solución: skin GLOBAL sobre `.mud-tooltip` (mismo precedente que Snackbar
 * §41). El impacto es: TODOS los MudTooltip del app adoptan padding/radius/
 * colors Guía Visual automáticamente — coherencia cross-app garantizada.
 *
 * Mapping Mud Color → CSS class on the tooltip popover:
 * Color.Default → .mud-tooltip-default
 * Color.Primary/Secondary/Info/Success/ → .mud-theme-X (mud-theme palette;
 * Warning/Error sobrescribimos con --color-X-darker)
 *
 * Spec Guía Visual (de components/shared/Tooltip.jsx):
 * - padding: 0.3rem 0.75rem (~5/12 px) — Mud default es 4/8
 * - border-radius: 0.5rem (8 px) — Mud default es 4 px
 * - color-dark: --color-gray-800 light / --color-dark-500 dark
 * - color-success: --color-success-darker
 * - color-error: --color-error-darker
 * - color-warning: --color-warning-darker
 * - color-info: --color-info-darker
 * - opacity 1, transitions 0.15 s
 * ============================================================================ */

.mud-tooltip {
 padding: 5px 12px !important;
 border-radius: var(--radius-lg) !important; /* 8 px */
 font-size: 12px !important;
 font-weight: 500 !important;
 line-height: 1.4 !important;
}

/* Default (Color.Default) — gray-800 light, dark-500 dark. */
.mud-tooltip.mud-tooltip-default {
 background-color: var(--color-gray-800) !important;
 color: var(--color-white) !important;
}
html.dark .mud-tooltip.mud-tooltip-default {
 background-color: var(--color-dark-500) !important;
 color: var(--color-dark-50) !important;
}
.mud-tooltip.mud-tooltip-default.mud-tooltip-arrow::after {
 border-color: var(--color-gray-800) transparent transparent transparent !important;
}
html.dark .mud-tooltip.mud-tooltip-default.mud-tooltip-arrow::after {
 border-color: var(--color-dark-500) transparent transparent transparent !important;
}

/* Color variants — Guía Visual usa --color-X-darker (más saturados que el base palette).
 .mud-theme-X es la clase que MudTooltip aplica cuando Color="Color.X". */
.mud-tooltip.mud-theme-success {
 background-color: var(--color-success-darker) !important;
 color: var(--color-white) !important;
}
.mud-tooltip.mud-theme-success.mud-tooltip-arrow::after {
 border-color: var(--color-success-darker) transparent transparent transparent !important;
}

.mud-tooltip.mud-theme-warning {
 background-color: var(--color-warning-darker) !important;
 color: var(--color-white) !important;
}
.mud-tooltip.mud-theme-warning.mud-tooltip-arrow::after {
 border-color: var(--color-warning-darker) transparent transparent transparent !important;
}

.mud-tooltip.mud-theme-info {
 background-color: var(--color-info-darker) !important;
 color: var(--color-white) !important;
}
.mud-tooltip.mud-theme-info.mud-tooltip-arrow::after {
 border-color: var(--color-info-darker) transparent transparent transparent !important;
}

.mud-tooltip.mud-theme-error {
 background-color: var(--color-error-darker) !important;
 color: var(--color-white) !important;
}
.mud-tooltip.mud-theme-error.mud-tooltip-arrow::after {
 border-color: var(--color-error-darker) transparent transparent transparent !important;
}

.mud-tooltip.mud-theme-primary {
 background-color: var(--color-primary-700) !important;
 color: var(--color-white) !important;
}
.mud-tooltip.mud-theme-primary.mud-tooltip-arrow::after {
 border-color: var(--color-primary-700) transparent transparent transparent !important;
}

/* Rich tooltip content — TooltipContent slot con avatar + texto multilínea.
 El skin global §57 fuerza font-size 12 / line-height 1.4 sobre el .mud-tooltip,
 pero los MudText interiores usan sus propias clases .mud-typography-X que
 ganan en specificity. Default Mud line-height de body2 (1.43) hace que el
 bloque de 2 líneas (~40 px) sea más alto que MudAvatar Size.Small (32 px),
 produciendo misalignment visual aunque el flex Center centre matemáticamente.
 Solución: usar Size.Medium (40 px, matchea Guía Visual size={10}) y comprimir
 line-height a 1.25 para que el bloque de texto matchee bien el avatar. */
.av-tooltip-rich .mud-typography {
 line-height: 1.25 !important;
}

/* ============================================================================
 * §58 ─── MudDialog — Guía Visual animation entrances + blur backdrop (opt-in)
 * ============================================================================
 *
 * MudDialog default (Mud 9.x) tiene un fade-in via opacity transition en el
 * .mud-popover wrapper. No tiene animation built-in en el .mud-dialog mismo,
 * así que @keyframes custom aplicados via clase opt-in funcionan limpio
 * sin pelear con animation existente.
 *
 * Variantes Guía Visual replicadas:
 * av-dialog--anim-shift-up → translateY(20px) → 0
 * av-dialog--anim-shift-down → translateY(-20px) → 0
 * av-dialog--anim-scale-up → scale(0.85) → 1
 * av-dialog--anim-scale-down → scale(1.15) → 1
 *
 * Backdrop blur — opt-in via class en el wrapper .mud-overlay-dialog. MudDialog
 * no expone API directa para esto; usamos selector descendant desde el .mud-dialog
 * con la clase opt-in para targetear su sibling overlay.
 *
 * Aplicación: pasar `Class="av-dialog--anim-X"` o `Class="av-dialog--blur-backdrop"`
 * en el <MudDialog>. El consumer puede componer (anim + backdrop juntas en la
 * misma cadena de clases).
 * ============================================================================ */

@keyframes av-dialog-shift-up {
 from { transform: translateY(20px); opacity: 0; }
 to { transform: translateY(0); opacity: 1; }
}
@keyframes av-dialog-shift-down {
 from { transform: translateY(-20px); opacity: 0; }
 to { transform: translateY(0); opacity: 1; }
}
@keyframes av-dialog-scale-up {
 from { transform: scale(0.85); opacity: 0; }
 to { transform: scale(1); opacity: 1; }
}
@keyframes av-dialog-scale-down {
 from { transform: scale(1.15); opacity: 0; }
 to { transform: scale(1); opacity: 1; }
}

.mud-dialog.av-dialog--anim-shift-up { animation: av-dialog-shift-up 300ms cubic-bezier(0.16, 1, 0.3, 1); }
.mud-dialog.av-dialog--anim-shift-down { animation: av-dialog-shift-down 300ms cubic-bezier(0.16, 1, 0.3, 1); }
.mud-dialog.av-dialog--anim-scale-up { animation: av-dialog-scale-up 300ms cubic-bezier(0.16, 1, 0.3, 1); }
.mud-dialog.av-dialog--anim-scale-down { animation: av-dialog-scale-down 300ms cubic-bezier(0.16, 1, 0.3, 1); }

/* Blur backdrop — Guía Visual usa `backdrop-blur-sm` (= blur(4px)) sobre el overlay
 dark. MudDialog renderea el overlay como hermano del .mud-dialog dentro del
 .mud-overlay-dialog; usamos :has() para detectar el dialog con la clase opt-in
 y aplicar el filter al overlay sibling. Soporte :has() en todos los targets
 modernos (Chrome 105+ / Firefox 121+ / Safari 15.4+). */
.mud-overlay-dialog:has(.mud-dialog.av-dialog--blur-backdrop) .mud-overlay-scrim,
.mud-overlay-dialog:has(.mud-dialog.av-dialog--blur-backdrop) .mud-overlay-simple {
 backdrop-filter: blur(8px);
 -webkit-backdrop-filter: blur(8px);
}

/* ============================================================================
 * §59 ─── MudStepper — Guía Visual line-space modifier (opt-in)
 * ============================================================================
 *
 * Replica el modifier Guía Visual `.steps.line-space` (forms/components/steps.css):
 * añade un gap entre el step header (círculo) y la línea conectora, en vez de
 * que la línea conecte el centro de un step con el centro del siguiente sin
 * espacio.
 *
 * Mud renderiza la línea como `.mud-stepper-nav-connector` con `margin: 0 -16px`
 * (horizontal) o `margin-inline-start: 28px` (vertical). Para crear el gap
 * Guía Visual-style, reemplazamos el margin con valores POSITIVOS que separan la
 * línea del step circle.
 *
 * Aplicación: <MudStepper Class="av-stepper--line-space">. Combinable con
 * Vertical="true" para vertical-with-line-space.
 * ============================================================================ */

/* Horizontal — gap 8 px a ambos lados de la línea (separación del step circle). */
.mud-stepper.av-stepper--line-space.mud-stepper__horizontal > .mud-stepper-nav > .mud-stepper-nav-connector {
 margin: 0 8px !important;
}

/* Vertical — gap 8 px top/bottom de la línea (separación del step circle). */
.mud-stepper.av-stepper--line-space.mud-stepper__vertical > .mud-stepper-nav > .mud-stepper-nav-connector {
 margin-top: 8px !important;
 margin-bottom: 8px !important;
}
.mud-stepper.av-stepper--line-space.mud-stepper__vertical > .mud-stepper-nav > .mud-stepper-nav-connector .mud-stepper-nav-connector-line {
 min-height: 16px !important;
}

/* ============================================================================
 * §60 ─── Av-Spinner — Guía Visual Spinner pixel-perfect (CSS-only primitive)
 * ============================================================================
 *
 * Guía Visual Spinner es arquitectónicamente distinto de MudProgressCircular:
 * Guía Visual = CSS `border-3 rounded-full` con `border-r-transparent` + animation spin
 * Mud = SVG <circle> con stroke-dasharray animation
 *
 * Por eso esta primitiva CSS-only replica el look Guía Visual pixel-perfect, sobre
 * <MudElement HtmlTag="span"> (doctrina §MudElement). MudProgressCircular sigue
 * disponible para inline buttons + use cases Mud-native (showcase mantiene
 * ambas variantes lado a lado).
 *
 * Variantes:
 * default — border completo + border-right transparent (look estándar)
 * --soft — border at 30% opacity + border-right at 100%
 * --elastic — animation-timing cubic-bezier (rebote elástico)
 * --inner-dot — SVG con círculo + dot interior (mask-image)
 * --no-anim — animation: none
 * --disabled — opacity 0.5 + animation pausada
 * --size-{3|5|7|10|12|14|16} — sizes Guía Visual (12/20/28/40/48/56/64 px)
 *
 * Color chain av-color-X (§14.1 ext) consume --av-this para el color del border.
 * Sin av-color-X → cae a neutral (gray-500 light / dark-400 dark).
 * ============================================================================ */

@keyframes av-spinner-spin {
 from { transform: rotate(0deg); }
 to { transform: rotate(360deg); }
}

/* Base — default variant (border completo + right transparent + animation spin). */
.av-spinner {
 display: inline-block;
 box-sizing: border-box;
 width: 28px;
 height: 28px;
 border-width: 3px;
 border-style: solid;
 border-color: var(--av-this, var(--color-gray-500));
 border-right-color: transparent;
 border-radius: 9999px;
 animation: av-spinner-spin 1s linear infinite;
 vertical-align: middle;
}
html.dark .av-spinner {
 border-color: var(--av-this-lighter, var(--color-dark-400));
 border-right-color: transparent;
}

/* Soft variant — border at 30% opacity + border-right at 100% (color saturado). */
.av-spinner.av-spinner--soft {
 border-color: rgb(from var(--av-this, var(--color-gray-500)) r g b / 0.30);
 border-right-color: var(--av-this, var(--color-gray-500));
}
html.dark .av-spinner.av-spinner--soft {
 border-color: rgb(from var(--av-this-lighter, var(--color-dark-400)) r g b / 0.30);
 border-right-color: var(--av-this-lighter, var(--color-dark-400));
}

/* Elastic variant — cubic-bezier easing (rebote tipo Guía Visual is-elastic). */
.av-spinner.av-spinner--elastic {
 animation-timing-function: cubic-bezier(0.5, 1.8, 0.5, 0.8);
}

/* Inner Dot variant — SVG icon con círculo perimetral + dot interior, mask-image
 para que el color venga de --av-this (via background-color mascarado). */
.av-spinner.av-spinner--inner-dot {
 border: none;
 background-color: var(--av-this, var(--color-gray-500));
 mask-image: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 28 28'><path fill-rule='evenodd' clip-rule='evenodd' d='M28 14c0 7.732-6.268 14-14 14S0 21.732 0 14 6.268 0 14 0s14 6.268 14 14zm-2.764.005c0 6.185-5.014 11.2-11.2 11.2-6.185 0-11.2-5.015-11.2-11.2 0-6.186 5.015-11.2 11.2-11.2 6.186 0 11.2 5.014 11.2 11.2zM8.4 16.8a2.8 2.8 0 100-5.6 2.8 2.8 0 000 5.6z'/></svg>");
 -webkit-mask-image: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 28 28'><path fill-rule='evenodd' clip-rule='evenodd' d='M28 14c0 7.732-6.268 14-14 14S0 21.732 0 14 6.268 0 14 0s14 6.268 14 14zm-2.764.005c0 6.185-5.014 11.2-11.2 11.2-6.185 0-11.2-5.015-11.2-11.2 0-6.186 5.015-11.2 11.2-11.2 6.186 0 11.2 5.014 11.2 11.2zM8.4 16.8a2.8 2.8 0 100-5.6 2.8 2.8 0 000 5.6z'/></svg>");
 mask-size: contain;
 -webkit-mask-size: contain;
 mask-position: center;
 -webkit-mask-position: center;
 mask-repeat: no-repeat;
 -webkit-mask-repeat: no-repeat;
}
html.dark .av-spinner.av-spinner--inner-dot {
 background-color: var(--av-this-lighter, var(--color-dark-400));
}

/* No animation — Guía Visual animate={false}. */
.av-spinner.av-spinner--no-anim {
 animation: none;
}

/* Disabled — opacity 0.5 + animation pausada. */
.av-spinner.av-spinner--disabled {
 opacity: 0.5;
 animation: none;
}

/* Sizes — escala Guía Visual size-{3|5|7|10|12|14|16}. */
.av-spinner.av-spinner--size-3 { width: 12px; height: 12px; border-width: 1px; }
.av-spinner.av-spinner--size-5 { width: 20px; height: 20px; border-width: 2px; }
.av-spinner.av-spinner--size-7 { width: 28px; height: 28px; border-width: 3px; }
.av-spinner.av-spinner--size-10 { width: 40px; height: 40px; border-width: 3px; }
.av-spinner.av-spinner--size-12 { width: 48px; height: 48px; border-width: 4px; }
.av-spinner.av-spinner--size-14 { width: 56px; height: 56px; border-width: 4px; }
.av-spinner.av-spinner--size-16 { width: 64px; height: 64px; border-width: 4px; }

/* ============================================================================
 * §61 ─── Av-Carousel — MudCarousel companion utilities
 * ----------------------------------------------------------------------------
 * Set de utility classes para el showcase MudCarousel — heights, slide
 * content layout, gradient backgrounds del demo Guía Visual, bullet dot
 * (square pagination) custom y arrow pill (HeroIcons en pill oscuro).
 *
 * Las gradient slides NO son tokens del design system — son visuales
 * demo del showcase únicamente. Si en producción se usa MudCarousel para
 * un banner real, el consumer aporta sus propias imágenes / surfaces.
 *
 * Bullet dot + arrow pill SÍ son utility reusable: cualquier MudCarousel
 * que quiera el look Guía Visual (square dot pagination + dark pill arrows)
 * los consume via Class= en BulletTemplate / NextButtonTemplate.
 * ============================================================================ */

/* Frame height (240 px = h-60 Tailwind) — slide container. */
.av-carousel-h-60.mud-carousel {
 height: 240px;
}

/* Slide content layout — flex column center + 100% del frame del item. */
.av-carousel-slide {
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 height: 100%;
 width: 100%;
 color: var(--color-white);
 padding: 16px;
}

/* Slide tints — gradient backgrounds del demo. Theme-aware via tokens. */
.av-carousel-slide--primary {
 background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-700));
}
.av-carousel-slide--secondary {
 background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-darker));
}
.av-carousel-slide--info {
 background: linear-gradient(135deg, var(--color-info), var(--color-info-darker));
}
.av-carousel-slide--success {
 background: linear-gradient(135deg, var(--color-success), var(--color-success-darker));
}

/* Multi-color combos — info+primary, success+info, warning+error.  */
.av-carousel-slide--combo-blue {
 background: linear-gradient(135deg, var(--color-info), var(--color-primary-500));
}
.av-carousel-slide--combo-green {
 background: linear-gradient(135deg, var(--color-success), var(--color-info));
}
.av-carousel-slide--combo-fire {
 background: linear-gradient(135deg, var(--color-warning), var(--color-error));
}

/* Dark slide — slate gradient cuando el showcase necesita un canvas oscuro
   para que los arrow pills resalten. */
.av-carousel-slide--dark {
 background: linear-gradient(135deg, #1e293b, #0f172a);
}
html.dark .av-carousel-slide--dark {
 background: linear-gradient(135deg, var(--color-dark-700), var(--color-dark-900));
}

/* Neutral slide — gris claro / dark surface. Para variantes "data" con
   texto color natural del theme (no white forzado). */
.av-carousel-slide--neutral {
 background: var(--color-gray-200);
 color: var(--color-gray-800);
}
html.dark .av-carousel-slide--neutral {
 background: var(--color-dark-700);
 color: var(--color-dark-100);
}

/* Bullet dot pagination (Guía Visual square pill style).
   Base = 12×4 inactive. Active modifier expande a 24×4 + color primary.
   Aplicar dentro de BulletTemplate del MudCarousel:
     <BulletTemplate Context="selected">
       <MudElement HtmlTag="span"
         Class="@($"av-carousel-bullet-dot {(selected ? "av-carousel-bullet-dot--active" : "")}")" />
     </BulletTemplate>  */
.av-carousel-bullet-dot {
 display: inline-block;
 width: 12px;
 height: 4px;
 margin: 0 4px;
 border-radius: 9999px;
 background-color: var(--color-gray-400);
 cursor: pointer;
 transition: width 200ms ease, background-color 200ms ease;
}
.av-carousel-bullet-dot.av-carousel-bullet-dot--active {
 width: 24px;
 background-color: var(--color-primary-600);
}
html.dark .av-carousel-bullet-dot {
 background-color: var(--color-dark-300);
}
html.dark .av-carousel-bullet-dot.av-carousel-bullet-dot--active {
 background-color: var(--color-primary-400);
}

/* Arrow pill (Guía Visual dark pill con icono blanco) — modifier al MudIconButton
   dentro de NextButtonTemplate / PreviousButtonTemplate. */
.av-carousel-arrow-pill.mud-icon-button-root {
 background-color: rgb(from var(--color-gray-900) r g b / 0.5);
 color: var(--color-white);
 border-radius: 9999px;
}
.av-carousel-arrow-pill.mud-icon-button-root:hover {
 background-color: rgb(from var(--color-gray-900) r g b / 0.7);
}
html.dark .av-carousel-arrow-pill.mud-icon-button-root {
 background-color: rgb(from var(--color-dark-900) r g b / 0.6);
}
html.dark .av-carousel-arrow-pill.mud-icon-button-root:hover {
 background-color: rgb(from var(--color-dark-900) r g b / 0.8);
}

/* Max-width wrapper para showcase (carouseles se renderean a 480 px máx). */
.av-carousel-max-md {
 max-width: 480px;
}

/* ============================================================================
 * §62 ─── Av-File-Upload — MudFileUpload companion utilities
 * ----------------------------------------------------------------------------
 * Set de utility classes para el showcase MudFileUpload — square dashed
 * add button, thumbnail card con remove X overlay, input-like trigger
 * con prefix/suffix, file row item para dropzone. Replica el visual del
 * demo Guía Visual forms/file-upload.
 *
 * Reusable: cualquier MudFileUpload en producción puede consumir estas
 * classes via Class= en CustomContent / SelectedTemplate cuando quiera el
 * look Guía Visual.
 * ============================================================================ */

/* Square dashed add button (80×80) — el "+" para agregar nueva imagen.
   Aplica sobre MudButton dentro de CustomContent. Hover deviene primary. */
.av-file-upload-square-add.mud-button-root {
 width: 80px;
 height: 80px;
 min-width: 0;
 padding: 0;
 border-radius: var(--radius-lg);
 border: 2px dashed var(--color-gray-300);
 background-color: transparent;
 color: var(--color-gray-400);
 transition: border-color 150ms ease, color 150ms ease;
}
.av-file-upload-square-add.mud-button-root:hover {
 border-color: var(--color-primary-600);
 color: var(--color-primary-600);
 background-color: transparent;
}
html.dark .av-file-upload-square-add.mud-button-root {
 border-color: var(--color-dark-450);
 color: var(--color-dark-300);
}
html.dark .av-file-upload-square-add.mud-button-root:hover {
 border-color: var(--color-primary-400);
 color: var(--color-primary-400);
}

/* Thumbnail card 80×80 — contenedor del preview de imagen subida. Wrapper
   con overflow hidden para que el img.cover quede recortado al border-radius. */
.av-file-upload-thumb {
 position: relative;
 width: 80px;
 height: 80px;
 border-radius: var(--radius-lg);
 overflow: hidden;
 border: 1px solid var(--color-gray-200);
 background-color: var(--color-gray-100);
}
html.dark .av-file-upload-thumb {
 border-color: var(--color-dark-500);
 background-color: var(--color-dark-700);
}

.av-file-upload-thumb__img {
 width: 100%;
 height: 100%;
 object-fit: cover;
 display: block;
}

/* Remove X overlay sobre el thumbnail (top-right corner). Aparece siempre
   visible — pixel-perfect con FileItemSquare del demo. */
.av-file-upload-thumb__remove.mud-icon-button-root {
 position: absolute;
 top: 4px;
 right: 4px;
 width: 20px;
 height: 20px;
 min-width: 0;
 padding: 0;
 border-radius: 9999px;
 background-color: rgb(from var(--color-gray-900) r g b / 0.7);
 color: var(--color-white);
 z-index: 1;
}
.av-file-upload-thumb__remove.mud-icon-button-root:hover {
 background-color: var(--color-error);
}
.av-file-upload-thumb__remove.mud-icon-button-root .mud-icon-root {
 width: 12px;
 height: 12px;
}

/* Input-like trigger (sec 3 InputView) — botón con look de input outlined
   que muestra filename adentro + paperclip prefix + X suffix. Aplica sobre
   MudButton dentro de CustomContent. */
.av-file-upload-input-trigger.mud-button-root {
 display: flex;
 align-items: center;
 gap: 8px;
 width: 100%;
 height: 40px;
 padding: 0 12px;
 border-radius: var(--radius-md);
 border: 1px solid var(--color-gray-300);
 background-color: var(--color-white);
 color: var(--color-gray-800);
 text-transform: none;
 font-weight: 400;
 justify-content: flex-start;
 cursor: pointer;
 transition: border-color 150ms ease;
}
.av-file-upload-input-trigger.mud-button-root:hover {
 border-color: var(--color-gray-400);
 background-color: var(--color-white);
}
html.dark .av-file-upload-input-trigger.mud-button-root {
 border-color: var(--color-dark-450);
 background-color: var(--color-dark-800);
 color: var(--color-dark-100);
}
html.dark .av-file-upload-input-trigger.mud-button-root:hover {
 border-color: var(--color-dark-300);
 background-color: var(--color-dark-800);
}

.av-file-upload-input-trigger__filename {
 flex: 1 1 auto;
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
 text-align: start;
}
.av-file-upload-input-trigger--empty .av-file-upload-input-trigger__filename {
 color: var(--color-gray-500);
}
html.dark .av-file-upload-input-trigger--empty .av-file-upload-input-trigger__filename {
 color: var(--color-dark-300);
}

/* Round flat X dentro del input-like trigger (suffix). */
.av-file-upload-input-trigger__clear.mud-icon-button-root {
 width: 20px;
 height: 20px;
 min-width: 0;
 padding: 0;
 border-radius: 9999px;
 background-color: var(--color-gray-200);
 color: var(--color-gray-700);
 flex-shrink: 0;
}
.av-file-upload-input-trigger__clear.mud-icon-button-root:hover {
 background-color: var(--color-error);
 color: var(--color-white);
}
html.dark .av-file-upload-input-trigger__clear.mud-icon-button-root {
 background-color: var(--color-dark-600);
 color: var(--color-dark-100);
}
.av-file-upload-input-trigger__clear.mud-icon-button-root .mud-icon-root {
 width: 14px;
 height: 14px;
}

/* Max-width wrapper para showcase (file uploads se renderean a 576 px = max-w-xl). */
.av-file-upload-max-xl {
 max-width: 576px;
}

/* ============================================================================
 * §63 ─── Av-Accordion — MudExpansionPanels variant modifiers (opt-in)
 * ----------------------------------------------------------------------------
 * Set de modifiers para MudExpansionPanels que replican las variantes del
 * demo Guía Visual components/accordion: bordered (divide-y entre items),
 * full-bordered (border wrapper + radius + divide-y), separated (gap entre
 * items con surface propia), primary (bg saturado + text white), no-anim
 * (transition-duration 0). Cada modifier es aditivo sobre la base Mud.
 *
 * Mud renderiza .mud-expansion-panels como container y cada panel como
 * .mud-expand-panel con header .mud-expand-panel-header y contenido
 * .mud-expand-panel-content. Los modifiers se aplican via Class= sobre
 * el MudExpansionPanels y descienden hasta los hijos via selectores
 * descendientes (sin tocar otros consumers de Mud).
 *
 * Aplicación: <MudExpansionPanels Class="av-accordion av-accordion--bordered">
 * ============================================================================ */

/* Base — reset elevation/border defaults para que los modifiers manden. */
.av-accordion.mud-expansion-panels {
 box-shadow: none !important;
 background-color: transparent !important;
}
.av-accordion.mud-expansion-panels > .mud-expand-panel {
 background-color: transparent;
}
.av-accordion.mud-expansion-panels .mud-expand-panel-header {
 padding: 16px 0;
 font-size: 16px;
 font-weight: 500;
 color: var(--color-gray-700);
}
html.dark .av-accordion.mud-expansion-panels .mud-expand-panel-header {
 color: var(--color-dark-100);
}

/* Bordered modifier — divide-y entre items (gray-150 light / dark-500 dark). */
.av-accordion.av-accordion--bordered.mud-expansion-panels > .mud-expand-panel + .mud-expand-panel {
 border-top: 1px solid var(--color-gray-150);
}
html.dark .av-accordion.av-accordion--bordered.mud-expansion-panels > .mud-expand-panel + .mud-expand-panel {
 border-top-color: var(--color-dark-500);
}

/* Full Bordered modifier — wrapper border + radius + divide-y inner. */
.av-accordion.av-accordion--full-bordered.mud-expansion-panels {
 border: 1px solid var(--color-gray-150);
 border-radius: var(--radius-lg);
 overflow: hidden;
}
html.dark .av-accordion.av-accordion--full-bordered.mud-expansion-panels {
 border-color: var(--color-dark-500);
}
.av-accordion.av-accordion--full-bordered.mud-expansion-panels > .mud-expand-panel + .mud-expand-panel {
 border-top: 1px solid var(--color-gray-150);
}
html.dark .av-accordion.av-accordion--full-bordered.mud-expansion-panels > .mud-expand-panel + .mud-expand-panel {
 border-top-color: var(--color-dark-500);
}
.av-accordion.av-accordion--full-bordered.mud-expansion-panels .mud-expand-panel-header {
 padding: 16px;
}
.av-accordion.av-accordion--full-bordered.mud-expansion-panels .mud-expand-panel-content {
 padding: 0 16px 16px;
}
@media (min-width: 640px) {
 .av-accordion.av-accordion--full-bordered.mud-expansion-panels .mud-expand-panel-header,
 .av-accordion.av-accordion--full-bordered.mud-expansion-panels .mud-expand-panel-content {
  padding-left: 20px;
  padding-right: 20px;
 }
}

/* Separated modifier — gap entre items, cada uno con surface y radius propios. */
.av-accordion.av-accordion--separated.mud-expansion-panels {
 display: flex;
 flex-direction: column;
 gap: 16px;
}
@media (min-width: 640px) {
 .av-accordion.av-accordion--separated.mud-expansion-panels {
  gap: 20px;
 }
}
.av-accordion.av-accordion--separated.mud-expansion-panels > .mud-expand-panel {
 background-color: var(--color-white);
 border: 1px solid var(--color-gray-150);
 border-radius: var(--radius-lg);
 overflow: hidden;
}
html.dark .av-accordion.av-accordion--separated.mud-expansion-panels > .mud-expand-panel {
 background-color: var(--color-dark-700);
 border-color: var(--color-dark-500);
}
.av-accordion.av-accordion--separated.mud-expansion-panels .mud-expand-panel-header {
 padding: 16px;
}
.av-accordion.av-accordion--separated.mud-expansion-panels .mud-expand-panel-content {
 padding: 0 16px 16px;
}

/* Primary modifier — bg saturado + text white en header, divide primary inner. */
.av-accordion.av-accordion--primary.mud-expansion-panels {
 border: 1px solid var(--color-primary-600);
 border-radius: var(--radius-lg);
 overflow: hidden;
}
html.dark .av-accordion.av-accordion--primary.mud-expansion-panels {
 border-color: var(--color-primary-500);
}
.av-accordion.av-accordion--primary.mud-expansion-panels > .mud-expand-panel + .mud-expand-panel {
 border-top: 1px solid var(--color-primary-400);
}
.av-accordion.av-accordion--primary.mud-expansion-panels .mud-expand-panel-header {
 background-color: var(--color-primary-600);
 color: var(--color-white);
 padding: 16px;
}
html.dark .av-accordion.av-accordion--primary.mud-expansion-panels .mud-expand-panel-header {
 background-color: var(--color-primary-500);
}
.av-accordion.av-accordion--primary.mud-expansion-panels .mud-expand-panel-header .mud-expand-panel-icon {
 color: var(--color-white);
}
.av-accordion.av-accordion--primary.mud-expansion-panels .mud-expand-panel-content {
 padding: 16px;
 background-color: var(--color-white);
 color: var(--color-gray-700);
}
html.dark .av-accordion.av-accordion--primary.mud-expansion-panels .mud-expand-panel-content {
 background-color: var(--color-dark-700);
 color: var(--color-dark-100);
}

/* No Animation modifier — disable collapse transition (transitionDuration=0). */
.av-accordion.av-accordion--no-anim.mud-expansion-panels .mud-collapse-container,
.av-accordion.av-accordion--no-anim.mud-expansion-panels .mud-collapse-wrapper,
.av-accordion.av-accordion--no-anim.mud-expansion-panels .mud-collapse-wrapper-inner {
 transition: none !important;
 animation: none !important;
}

/* Header rich content — para Custom / Advanced que tienen avatars + chevron
   manual. Suprime el icon default Mud (HideIcon en C# es la forma idiomática
   pero esto cubre cuando se quiere chevron custom dentro del TitleContent). */
.av-accordion-rich-header {
 display: flex;
 align-items: center;
 gap: 12px;
 flex: 1 1 auto;
}
.av-accordion-rich-header__title {
 flex: 1 1 auto;
}

/* Max-width wrapper para showcase (accordions se renderean a 576 px = max-w-xl). */
.av-accordion-max-xl {
 max-width: 576px;
}

/* ============================================================================
 * §64 ─── Av-Contextual-Help — minimal popover pattern (opt-in)
 * ----------------------------------------------------------------------------
 * Patrón Guía Visual: trigger icon-only round que abre un popover con
 * title + content. Sin equivalente Mud directo (MudTooltip es hover-only,
 * MudMenu siempre renderiza lista). La solución usa MudPopover anchored al
 * trigger + MudOverlay invisible para click-outside dismiss.
 *
 * Cada utility class lleva el prefix `.av-contextual-help-*` para que el
 * skin sea opt-in puro — cero impacto sobre MudPopover / MudIconButton de
 * producción.
 *
 * NOTA SOBRE EL SELECTOR: MudIconButton renderiza <button class="mud-button-root
 * mud-icon-button ...">. La clase Mud es `.mud-icon-button` (NO `.mud-icon-button-root`
 * — ese identificador NO existe en MudBlazor 9.x).
 *
 * Aplicación:
 *   <MudIconButton Class="av-contextual-help-trigger" ... />
 *   <MudPopover ...>
 *     <MudPaper Class="av-contextual-help-panel">
 *       <h3 class="av-contextual-help-title">Title</h3>
 *       <div class="av-contextual-help-body">Content</div>
 *     </MudPaper>
 *   </MudPopover>
 * ============================================================================ */

/* Trigger — pill round flat tight (default 26×26 con icon 18).
   !important para ganar al chain default Mud (padding 5px + sizing implicit).
   overflow:hidden corta el bg de hover al box del button (impide overflow
   cuando se monta en un input Adornment más bajo que el button).
   .mud-icon-button-label interno forzado a width/height 100% — heredado
   automático cuando aplica un size modifier (26 / 30 / 34). */
.av-contextual-help-trigger.mud-icon-button {
 width: 34px !important;
 height: 34px !important;
 min-width: 0 !important;
 padding: 0 !important;
 border-radius: 9999px;
 background-color: transparent;
 color: var(--color-gray-500);
 transition: background-color 150ms ease, color 150ms ease;
 box-sizing: border-box;
 overflow: hidden;
}
.av-contextual-help-trigger.mud-icon-button:hover {
 background-color: var(--color-gray-150);
 color: var(--color-gray-700);
}
html.dark .av-contextual-help-trigger.mud-icon-button {
 color: var(--color-dark-300);
}
html.dark .av-contextual-help-trigger.mud-icon-button:hover {
 background-color: var(--color-dark-600);
 color: var(--color-dark-100);
}
/* Label interno hereda tamaño del button (responsivo a los size modifiers). */
.av-contextual-help-trigger.mud-icon-button .mud-icon-button-label {
 width: 100%;
 height: 100%;
 padding: 0;
 display: flex;
 align-items: center;
 justify-content: center;
}
.av-contextual-help-trigger.mud-icon-button .mud-icon-root {
 width: 22px;
 height: 22px;
}

/* Size modifiers — escala 26 (xs) / 30 (sm) / 34 (default). El icon escala
   con el button para mantener un halo tight (4-6 px más grande que el icon). */
.av-contextual-help-trigger.av-contextual-help-trigger--xs.mud-icon-button {
 width: 26px !important;
 height: 26px !important;
}
.av-contextual-help-trigger.av-contextual-help-trigger--xs.mud-icon-button .mud-icon-root {
 width: 18px;
 height: 18px;
}

.av-contextual-help-trigger.av-contextual-help-trigger--sm.mud-icon-button {
 width: 30px !important;
 height: 30px !important;
}
.av-contextual-help-trigger.av-contextual-help-trigger--sm.mud-icon-button .mud-icon-root {
 width: 20px;
 height: 20px;
}

/* Panel — popover surface 320 px con border + radius + shadow.
   Replica el PopoverPanel del demo (w-80 rounded-md border bg-white shadow-lg). */
.av-contextual-help-panel.mud-paper {
 width: 320px;
 padding: 16px;
 background-color: var(--color-white);
 border: 1px solid var(--color-gray-300);
 border-radius: var(--radius-md);
 box-shadow: var(--shadow-lg);
}
html.dark .av-contextual-help-panel.mud-paper {
 background-color: var(--color-dark-750);
 border-color: var(--color-dark-500);
 box-shadow: none;
}

/* Title — text-sm (14 px) bold sobre top — compacto, alineado con tooltips. */
.av-contextual-help-title {
 margin: 0 0 6px;
 font-size: var(--text-sm);
 font-weight: 600;
 line-height: 1.4;
 color: var(--color-gray-800);
}
html.dark .av-contextual-help-title {
 color: var(--color-dark-100);
}

/* Body — text-xs-plus (13 px) muted para el content. */
.av-contextual-help-body {
 font-size: var(--text-xs-plus);
 line-height: 1.5;
 color: var(--color-gray-500);
}
html.dark .av-contextual-help-body {
 color: var(--color-dark-200);
}
.av-contextual-help-body p {
 margin: 0;
}
.av-contextual-help-body p + p {
 margin-top: 8px;
}

/* Panel size modifier --compact — title y body un nivel más chico cuando
   el consumer quiere un popover más denso (form fields, table cells). */
.av-contextual-help-panel.av-contextual-help-panel--compact.mud-paper {
 width: 280px;
 padding: 12px;
}
.av-contextual-help-panel--compact .av-contextual-help-title {
 font-size: var(--text-xs-plus);
 margin-bottom: 4px;
}
.av-contextual-help-panel--compact .av-contextual-help-body {
 font-size: var(--text-xs);
 line-height: 1.45;
}

/* Title size modifiers — aplicables sin tocar el panel (el consumer elige
   tipografía solo para el title). */
.av-contextual-help-title.av-contextual-help-title--sm {
 font-size: var(--text-xs-plus);
}
.av-contextual-help-title.av-contextual-help-title--xs {
 font-size: var(--text-xs);
}

/* ============================================================================
 * §65 ─── Av-TreeView — MudTreeView Guía Visual look (opt-in)
 * ----------------------------------------------------------------------------
 * Replica el visual del demo Guía Visual components/treeview: hover bg gray-100
 * + chevron rotate 90° + tipografía tracking-wide + padding compact. El skin
 * es scope-restringido a .av-treeview — cero impacto sobre MudTreeView de
 * producción.
 *
 * Aplicación:
 *   <MudTreeView Class="av-treeview" T="string">
 *     <MudTreeViewItem Value="@(...)" Text="..." />
 *     <MudTreeViewItem Value="@(...)" Text="...">
 *       <MudTreeViewItem ... />
 *     </MudTreeViewItem>
 *   </MudTreeView>
 *
 * El folder icon (sec Advanced) se pasa al item via parameter Icon="@HeroIcons.Outline.Folder"
 * + IconColor="Color.Warning" — heredados Mud-native, sin modifier extra.
 * ============================================================================ */

/* Container reset — sin border / shadow / bg propio. */
.av-treeview.mud-treeview {
 background-color: transparent;
}

/* Item content — fila clickeable con padding compact + radius + transition. */
.av-treeview .mud-treeview-item-content {
 padding: 4px 8px;
 border-radius: var(--radius-sm);
 letter-spacing: 0.025em;
 color: var(--color-gray-600);
 transition: background-color 150ms ease, color 150ms ease;
 cursor: pointer;
}
.av-treeview .mud-treeview-item-content:hover,
.av-treeview .mud-treeview-item-content:focus-within {
 background-color: var(--color-gray-100);
 color: var(--color-gray-800);
}
html.dark .av-treeview .mud-treeview-item-content {
 color: var(--color-dark-200);
}
html.dark .av-treeview .mud-treeview-item-content:hover,
html.dark .av-treeview .mud-treeview-item-content:focus-within {
 background-color: var(--color-dark-600);
 color: var(--color-dark-100);
}

/* Selected item — color gray-800 / dark-100 (sin bg saturado). */
.av-treeview .mud-treeview-item-selected > .mud-treeview-item-content {
 background-color: transparent;
 color: var(--color-gray-800);
}
html.dark .av-treeview .mud-treeview-item-selected > .mud-treeview-item-content {
 color: var(--color-dark-100);
}

/* Chevron — rotate 90° cuando expanded (replica el demo). Mud usa
   .mud-treeview-item-arrow-expand class on toggle. */
.av-treeview .mud-treeview-item-arrow {
 color: var(--color-gray-500);
 transition: transform 200ms ease;
}
html.dark .av-treeview .mud-treeview-item-arrow {
 color: var(--color-dark-300);
}

/* Indent — pl-4 (16 px) entre niveles, replica el spacing del demo. */
.av-treeview .mud-treeview-group {
 padding-left: 16px;
}

/* Text typography — font-medium (500) + tracking-wide ya en item-content. */
.av-treeview .mud-treeview-item-content .mud-typography {
 font-weight: 500;
}

/* Icon slot — el icon (folder, file, etc.) renderea via Mud Icon parameter
   en MudTreeViewItem. Gap 12 px entre chevron y icon, y entre icon y text. */
.av-treeview .mud-treeview-item-icon {
 margin-right: 12px;
}

/* Max-width wrapper para showcase (treeview se renderea a 320 px = max-w-xs). */
.av-treeview-max-xs {
 max-width: 320px;
}

/* ============================================================================
 * §66 ─── Av-Dropdown — MudMenu Guía Visual popover look (opt-in)
 * ----------------------------------------------------------------------------
 * Replica el visual del demo Guía Visual components/dropdown: panel rounded-lg
 * border + shadow-lg + bg-white / dark-700, items height 36 con tracking-wide
 * + hover bg gray-100 / dark-600. El skin se aplica via PopoverClass= sobre
 * el MudMenu — scope-restringido a .av-dropdown-menu, cero impacto sobre
 * MudMenu de producción.
 *
 * NOTA SOBRE EL SELECTOR: MudMenu renderiza un MudList dentro del popover
 * con clase .mud-menu-list, y cada MudMenuItem es .mud-menu-item. NO usa
 * .mud-list-item (eso es para MudList standalone).
 *
 * Aplicación:
 *   <MudMenu PopoverClass="av-dropdown-menu">
 *     <ActivatorContent>...</ActivatorContent>
 *     <ChildContent>
 *       <MudMenuItem>Action</MudMenuItem>
 *       <MudDivider />
 *       <MudMenuItem>Separated</MudMenuItem>
 *     </ChildContent>
 *   </MudMenu>
 * ============================================================================ */

/* Panel — el popover wrapper que envuelve la lista de items. PopoverClass
   se aplica al .mud-popover-open root, no al list interno. Apuntamos al
   list interno via descendant. */
.av-dropdown-menu.mud-popover {
 min-width: 11rem; /* 176 px — replica min-w-[11rem] del demo */
 padding: 4px 0;
 background-color: var(--color-white);
 border: 1px solid var(--color-gray-300);
 border-radius: var(--radius-lg);
 box-shadow: var(--shadow-lg);
}
html.dark .av-dropdown-menu.mud-popover {
 background-color: var(--color-dark-700);
 border-color: var(--color-dark-500);
 box-shadow: none;
}

/* MudList interno — sin padding extra (Mud aplica su propio gutter). */
.av-dropdown-menu .mud-menu-list,
.av-dropdown-menu .mud-list {
 padding: 0;
 background-color: transparent;
}

/* Items — height 36 + padding 12 + tracking-wide + hover bg gray-100. */
.av-dropdown-menu .mud-menu-item,
.av-dropdown-menu .mud-list-item {
 height: 36px;
 min-height: 36px;
 padding: 0 12px;
 letter-spacing: 0.025em;
 color: var(--color-gray-600);
 transition: background-color 150ms ease, color 150ms ease;
}
.av-dropdown-menu .mud-menu-item:hover,
.av-dropdown-menu .mud-menu-item:focus,
.av-dropdown-menu .mud-list-item:hover,
.av-dropdown-menu .mud-list-item:focus {
 background-color: var(--color-gray-100);
 color: var(--color-gray-800);
}
html.dark .av-dropdown-menu .mud-menu-item,
html.dark .av-dropdown-menu .mud-list-item {
 color: var(--color-dark-200);
}
html.dark .av-dropdown-menu .mud-menu-item:hover,
html.dark .av-dropdown-menu .mud-menu-item:focus,
html.dark .av-dropdown-menu .mud-list-item:hover,
html.dark .av-dropdown-menu .mud-list-item:focus {
 background-color: var(--color-dark-600);
 color: var(--color-dark-100);
}

/* Icon prefix — gap 12 px entre icon y text, color heredado del item. */
.av-dropdown-menu .mud-menu-item-icon,
.av-dropdown-menu .mud-list-item-icon {
 min-width: 0;
 margin-right: 12px;
 color: inherit;
}
.av-dropdown-menu .mud-menu-item-icon .mud-icon-root,
.av-dropdown-menu .mud-list-item-icon .mud-icon-root {
 width: 18px;
 height: 18px;
}

/* Divider — replica el <hr className="mx-3 my-1.5 border-gray-150"> del demo. */
.av-dropdown-menu .mud-divider {
 margin: 6px 12px;
 border-color: var(--color-gray-150);
}
html.dark .av-dropdown-menu .mud-divider {
 border-color: var(--color-dark-500);
}

/* Scrollable modifier — max-height + overflow-y (demo Scrollable section).
   Restablece overflow-y: auto que el bloque base deshabilitó por default. */
.av-dropdown-menu.av-dropdown-menu--scrollable .mud-menu-list,
.av-dropdown-menu.av-dropdown-menu--scrollable .mud-list {
 max-height: 240px;
 overflow-y: auto !important;
}

/* ============================================================================
 * §67 ─── Av-Popover — MudPopover Guía Visual panel (opt-in)
 * ----------------------------------------------------------------------------
 * Replica el visual del demo Guía Visual components/popover: panel con border +
 * radius + shadow + bg-white/dark-750. Visualmente similar a ContextualHelp
 * (§64) pero como clases independientes para evitar acoplamiento semántico —
 * Popover != ContextualHelp aunque el styling sea idéntico. Si alguien tunea
 * el ContextualHelp en el futuro, el Popover queda intocado y viceversa.
 *
 * Cada clase lleva prefix `.av-popover-*` — opt-in puro, cero impacto sobre
 * MudPopover de producción.
 *
 * Aplicación:
 *   <MudButton OnClick="@(() => _open = !_open)">Trigger</MudButton>
 *   <MudOverlay Visible="@_open" OnClick="@(() => _open = false)" DarkBackground="false" />
 *   <MudPopover Open="@_open" AnchorOrigin="..." TransformOrigin="...">
 *     <MudPaper Class="av-popover-panel av-popover-panel--w-80">
 *       <h3 class="av-popover-title">Title</h3>
 *       <p class="av-popover-body">Body</p>
 *       <p class="av-popover-meta">Footer meta</p>
 *     </MudPaper>
 *   </MudPopover>
 * ============================================================================ */

/* Panel — surface base con border + radius + shadow + bg. Width via modifier. */
.av-popover-panel.mud-paper {
 padding: 16px;
 background-color: var(--color-white);
 border: 1px solid var(--color-gray-300);
 border-radius: var(--radius-md);
 box-shadow: var(--shadow-lg);
 overflow: hidden;
}
html.dark .av-popover-panel.mud-paper {
 background-color: var(--color-dark-750);
 border-color: var(--color-dark-500);
 box-shadow: none;
}

/* Width modifiers — replican w-64 / w-72 / w-80 / w-96 del demo. */
.av-popover-panel.av-popover-panel--w-64.mud-paper { width: 256px; }
.av-popover-panel.av-popover-panel--w-72.mud-paper { width: 288px; }
.av-popover-panel.av-popover-panel--w-80.mud-paper { width: 320px; }
.av-popover-panel.av-popover-panel--w-96.mud-paper { width: 384px; }

/* Padding modifier — algunos panels (Links, Filter) usan zero-padding al
   wrapper porque tienen sub-sections con su propio padding (footer gray bg). */
.av-popover-panel.av-popover-panel--p-0.mud-paper {
 padding: 0;
}

/* Title — h3 14 px / 600 / gray-800 (similar a contextual help pero independiente). */
.av-popover-title {
 margin: 0 0 8px;
 font-size: var(--text-sm);
 font-weight: 600;
 line-height: 1.4;
 letter-spacing: 0.025em;
 color: var(--color-gray-800);
}
html.dark .av-popover-title {
 color: var(--color-dark-100);
}

/* Subtitle — text 14 px / 500 / gray-600 (entre title y body). */
.av-popover-subtitle {
 margin: 0 0 4px;
 font-size: var(--text-sm);
 font-weight: 500;
 line-height: 1.4;
 color: var(--color-gray-600);
}
html.dark .av-popover-subtitle {
 color: var(--color-dark-100);
}

/* Body — text 14 px regular gray-500 (muted, mismo nivel que ContextualHelp). */
.av-popover-body {
 margin: 0;
 font-size: var(--text-sm);
 line-height: 1.5;
 color: var(--color-gray-500);
}
html.dark .av-popover-body {
 color: var(--color-dark-200);
}

/* Meta — text 12 px muted al final del panel (timestamps, hints). */
.av-popover-meta {
 margin: 0;
 font-size: var(--text-xs);
 line-height: 1.4;
 color: var(--color-gray-400);
}
html.dark .av-popover-meta {
 color: var(--color-dark-300);
}

/* Divider — hr separator entre secciones del panel (forms, links). */
.av-popover-divider {
 margin: 16px 0;
 border: 0;
 border-top: 1px solid var(--color-gray-200);
}
html.dark .av-popover-divider {
 border-top-color: var(--color-dark-500);
}

/* Section gray — footer con bg gray-100 que extiende edge-to-edge dentro
   del panel (cuando av-popover-panel--p-0 está activo). */
.av-popover-section-gray {
 padding: 16px 28px;
 background-color: var(--color-gray-100);
}
html.dark .av-popover-section-gray {
 background-color: var(--color-dark-800);
}

/* Link card — patrón del demo Links: row clickeable con icon + name + desc,
   hover bg gray-100. */
.av-popover-link-card {
 display: flex;
 align-items: center;
 gap: 12px;
 padding: 8px;
 border-radius: var(--radius-md);
 text-decoration: none;
 color: inherit;
 transition: background-color 150ms ease;
}
.av-popover-link-card:hover {
 background-color: var(--color-gray-100);
}
html.dark .av-popover-link-card:hover {
 background-color: var(--color-dark-600);
}

.av-popover-link-card__icon {
 display: flex;
 align-items: center;
 justify-content: center;
 width: 40px;
 height: 40px;
 border-radius: var(--radius-md);
 background-color: var(--color-gray-100);
 color: var(--color-primary-500);
 flex-shrink: 0;
}
html.dark .av-popover-link-card__icon {
 background-color: var(--color-dark-600);
 color: var(--color-primary-400);
}

.av-popover-link-card__title {
 display: block;
 font-size: var(--text-sm);
 font-weight: 500;
 color: var(--color-gray-800);
 margin: 0 0 2px;
}
html.dark .av-popover-link-card__title {
 color: var(--color-dark-50);
}

.av-popover-link-card__desc {
 display: block;
 font-size: var(--text-xs-plus);
 color: var(--color-gray-500);
 margin: 0;
}
html.dark .av-popover-link-card__desc {
 color: var(--color-dark-200);
}

/* Link plain — quita text-decoration del <a> dentro del footer gray sin
   convertirlo en link-card (mantiene tipografía propia). */
.av-popover-link-plain {
 text-decoration: none;
 color: inherit;
}
.av-popover-link-plain:hover {
 text-decoration: underline;
}

/* Title inline modifier — quita el margin-bottom 8px para cuando el title
   va en un row flex (Filter header, etc.). */
.av-popover-title.av-popover-title--inline {
 margin: 0;
}

/* Section gray compact — padding 12/16/8 cuando el footer/header lleva
   un input dentro y necesita menos breathing room. */
.av-popover-section-gray.av-popover-section-gray--compact {
 padding: 12px 16px 8px;
}

/* Avatar stack — fila de avatars con overlap negativo (Advanced section). */
.av-popover-avatar-stack {
 display: flex;
 flex-direction: row;
}
.av-popover-avatar-stack > * + * {
 margin-left: -6px;
}
.av-popover-avatar-stack .mud-avatar {
 border: 2px solid var(--color-white);
}
html.dark .av-popover-avatar-stack .mud-avatar {
 border-color: var(--color-dark-700);
}

/* List scroll — max-height + overflow-y para listas largas dentro del panel
   (Filter section con 6+ people). overflow-x: hidden evita shifts cuando
   la scrollbar Y aparece y consume ancho. */
.av-popover-list-scroll {
 max-height: 360px;
 overflow-y: auto;
 overflow-x: hidden;
}

/* Person item — fila clickeable con avatar + name + position. Selected
   state pinta bg primary + text white (replica Combobox del demo). El
   padding-right es menor que padding-left para compensar el width que
   consume la scrollbar Y del list-scroll padre (visualmente queda parejo). */
.av-popover-person-item {
 display: flex;
 align-items: center;
 gap: 10px;
 width: 100%;
 padding: 10px 8px 10px 12px;
 background-color: transparent;
 border: 0;
 cursor: pointer;
 text-align: start;
 transition: background-color 150ms ease;
}
.av-popover-person-item:hover {
 background-color: var(--color-gray-100);
}
html.dark .av-popover-person-item:hover {
 background-color: var(--color-dark-600);
}
.av-popover-person-item.av-popover-person-item--selected {
 background-color: var(--color-primary-600);
}
html.dark .av-popover-person-item.av-popover-person-item--selected {
 background-color: var(--color-primary-500);
}
.av-popover-person-item.av-popover-person-item--selected .av-popover-link-card__title,
.av-popover-person-item.av-popover-person-item--selected .av-popover-link-card__desc {
 color: var(--color-white);
}
.av-popover-person-item.av-popover-person-item--selected .av-popover-link-card__desc {
 color: rgb(from var(--color-white) r g b / 0.85);
}

/* Body xs-plus modifier — para body más compact en Forms description. */
.av-popover-body.av-popover-body--xs-plus {
 font-size: var(--text-xs-plus);
}

/* People list — wrapper para MudList nativo usado en sec Filter. Override
   defaults Mud para edge-to-edge sin padding extra + selected state primary
   saturated (replica el demo Guía Visual). */
.av-popover-people-list.mud-list {
 padding: 0;
 max-height: 320px;
 overflow-y: auto;
 overflow-x: hidden;
 background-color: transparent;
}
.av-popover-people-list .mud-list-item {
 padding: 10px 16px;
}
.av-popover-people-list .mud-list-item:hover {
 background-color: var(--color-gray-100);
}
html.dark .av-popover-people-list .mud-list-item:hover {
 background-color: var(--color-dark-600);
}
/* Selected state — bg primary saturado + text white. */
.av-popover-people-list .mud-list-item.mud-selected-item,
.av-popover-people-list .mud-list-item-selected {
 background-color: var(--color-primary-600) !important;
 color: var(--color-white) !important;
}
html.dark .av-popover-people-list .mud-list-item.mud-selected-item,
html.dark .av-popover-people-list .mud-list-item-selected {
 background-color: var(--color-primary-500) !important;
}
.av-popover-people-list .mud-list-item.mud-selected-item .mud-list-item-text,
.av-popover-people-list .mud-list-item-selected .mud-list-item-text,
.av-popover-people-list .mud-list-item.mud-selected-item .mud-list-item-secondary-text,
.av-popover-people-list .mud-list-item-selected .mud-list-item-secondary-text {
 color: var(--color-white);
}
/* Typography del item — tighter alineado con el demo Guía Visual. */
.av-popover-people-list .mud-list-item-text {
 font-size: var(--text-xs-plus);
 font-weight: 500;
 line-height: 1.4;
}
.av-popover-people-list .mud-list-item-secondary-text {
 font-size: var(--text-xs);
 margin-top: 2px;
 color: var(--color-gray-500);
}
html.dark .av-popover-people-list .mud-list-item-secondary-text {
 color: var(--color-dark-300);
}
/* Avatar slot — margin-right tight. */
.av-popover-people-list .mud-list-item-avatar {
 min-width: 0;
 margin-right: 12px;
}

/* Advanced trigger — width 256 + padding vertical generoso + justify space-between
   para layouts rich (avatar + name + role + chevron). Replica el patrón del
   demo Guía Visual Advanced. Modifier aditivo sobre av-btn / av-btn-outlined. */
.av-dropdown-advanced-trigger.mud-button-root {
 width: 256px;
 padding: 18px 16px !important;
 justify-content: space-between;
 height: auto !important;
}
.av-dropdown-advanced-trigger.mud-button-root .mud-button-label {
 justify-content: space-between;
 width: 100%;
 gap: 12px;
}

/* Prevent scroll horizontal en el panel + el list interno. Por default Mud
   aplica .mud-list { overflow-y: auto } que muestra scrollbar Y ocupando
   width y empujando el contenido a generar scroll X. Override a hidden
   en ambos ejes cuando NO es scrollable. */
.av-dropdown-menu,
.av-dropdown-menu.mud-popover {
 overflow: hidden !important;
 box-sizing: border-box;
}
.av-dropdown-menu .mud-menu-list,
.av-dropdown-menu .mud-list {
 overflow-x: hidden !important;
 overflow-y: hidden !important;
}
.av-dropdown-menu .mud-menu-item,
.av-dropdown-menu .mud-list-item {
 white-space: nowrap;
}

/* ============================================================================
 * §68 ─── Av-Tabs (page-level navigation) — DOS PRIMITIVAS
 * ----------------------------------------------------------------------------
 * Dos componentes Razor independientes (Shared/Layout/AvTabsWithIcon +
 * AvTabsBoxed) con dos skins separados.
 *
 *   §68.1  .av-tabs-with-icon   underline variant con optional icons + count
 *                                badge. Built on top of MudTabs con chrome
 *                                neutralizado (mud-bridge.css §14) — Mud's
 *                                slider, transitions, scroll buttons y panels
 *                                container están suprimidos. El consumer
 *                                maneja el content via switch del ActiveIndex
 *                                externamente (no via MudTabPanel).
 *
 *   §68.2  .av-tabs-boxed       segmented-control variant 100% custom (NO usa
 *                                MudTabs raw). Wrapper <div> + <nav> con
 *                                <MudButton> por tab. El active modifier
 *                                marca el tab card-style (bg white + shadow).
 *                                Label-only por design.
 *
 * DAÑO COLATERAL — el override legacy de MudTabs en avalme.css §31439-31540
 * pinta TODOS los MudTabs de producción con pill primary + color:white
 * !important. Este §68.1 usa !important agresivo en color/padding/border
 * para batirle EN EL SCOPE de .av-tabs-with-icon — otros MudTabs sin esta
 * clase mantienen el styling legacy intocado.
 *
 * Aplicación:
 *   <AvTabsWithIcon Items="@_tabs" @bind-ActiveIndex="_index" />
 *   <AvTabsBoxed Items="@_subTabs" @bind-ActiveIndex="_subIndex" />
 * ============================================================================ */

/* §68.1 — Underline tabs (icon variant)
   Companion bridge: mud-bridge.css §14 — neutraliza el chrome de MudTabs
   (toolbar padding, slider, scroll buttons, panel container) dentro del
   scope .av-tabs-with-icon. Esta sección solo pinta el underline, tab
   typography, active state y count badge.

   Scrollbar hidden cross-browser para que el underline no se vea masked
   por una scrollbar nativa cuando los tabs overflowean. */
.av-tabs-with-icon.mud-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}
.av-tabs-with-icon.mud-tabs::-webkit-scrollbar {
    display: none;
}

/* Linea gray-150 de 2 px que va debajo de todos los tabs.
   Cada tab tiene margin-bottom: -2px (más abajo) para que su propio
   border-bottom de 2 px overlapea esta línea. El tab activo tiene el
   border en primary-600 reemplazando localmente la línea gray. */
.av-tabs-with-icon .mud-tabs-tabbar-wrapper {
    border-bottom: 2px solid var(--color-gray-150);
}

/* Cada tab — la clase <button class="mud-tab"> de Mud después del bridge.
   !important en color/padding para batir al legacy de avalme.css §31439
   (que setea color: white !important en .mud-tabs .mud-tab.mud-tab-active
   y padding: 0.75rem 1.25rem !important sin scope). El .av-tabs-with-icon
   prefix mantiene nuestro override scope-restringido. */
.av-tabs-with-icon .mud-tab {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 14px 16px !important;
    margin: 0 0 -2px 0 !important;
    border-radius: 0 !important;
    border-bottom: 2px solid transparent;
    color: var(--color-gray-700) !important;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    cursor: pointer;
    transition: none !important;
}

.av-tabs-with-icon .mud-tab:hover,
.av-tabs-with-icon .mud-tab:focus {
    color: var(--color-gray-900) !important;
    outline: 0;
}

.av-tabs-with-icon .mud-tab.mud-tab-active {
    border-bottom-color: var(--color-primary-600) !important;
    color: var(--color-primary-600) !important;
}

/* Leading icon en .mud-tab-content — 18×18 para parity con Guía Visual WithIcon. */
.av-tabs-with-icon .mud-tab .mud-icon-root,
.av-tabs-with-icon .mud-tab svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Trailing count badge — vía .av-tabs-with-icon__tab-count en <MudElement HtmlTag="span">. */
.av-tabs-with-icon__tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    padding: 1px 6px;
    background: var(--color-gray-100);
    color: var(--color-gray-600);
    border-radius: 9999px;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
}

.av-tabs-with-icon .mud-tab.mud-tab-active .av-tabs-with-icon__tab-count {
    background: var(--color-primary-100);
    color: var(--color-primary-700);
}

/* Dark mode — same !important strategy as light mode. */
html.dark .av-tabs-with-icon .mud-tabs-tabbar-wrapper {
    border-bottom-color: var(--color-dark-500);
}

html.dark .av-tabs-with-icon .mud-tab {
    color: var(--color-dark-200) !important;
}

html.dark .av-tabs-with-icon .mud-tab:hover,
html.dark .av-tabs-with-icon .mud-tab:focus {
    color: var(--color-dark-100) !important;
}

html.dark .av-tabs-with-icon .mud-tab.mud-tab-active {
    border-bottom-color: var(--color-primary-500) !important;
    color: var(--color-primary-400) !important;
}

html.dark .av-tabs-with-icon__tab-count {
    background: var(--color-dark-600);
    color: var(--color-dark-200);
}

html.dark .av-tabs-with-icon .mud-tab.mud-tab-active .av-tabs-with-icon__tab-count {
    background: rgb(from var(--color-primary-500) r g b / 0.16);
    color: var(--color-primary-300);
}


/* §68.2 — Boxed tabs (segmented-control variant, 100% custom).
   NO usa MudTabs — wrapper <div> + <nav> + <MudButton> por tab. */
.av-tabs-boxed {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.av-tabs-boxed::-webkit-scrollbar {
    display: none;
}

.av-tabs-boxed__list {
    display: inline-flex;
    width: max-content;
    min-width: 100%;
    padding: 4px 6px;
    background: var(--color-gray-200);
    color: var(--color-gray-600);
    border-radius: 8px;
}

.av-tabs-boxed__tab {
    flex-shrink: 0;
    padding: 6px 12px;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: inherit;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.15s, background-color 0.15s, box-shadow 0.15s;
}

.av-tabs-boxed__tab:hover,
.av-tabs-boxed__tab:focus {
    color: var(--color-gray-900);
    outline: 0;
}

.av-tabs-boxed__tab--active {
    background: var(--color-white);
    color: var(--color-gray-900);
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.08), 0 1px 2px rgb(0 0 0 / 0.06);
}

/* Dark mode */
html.dark .av-tabs-boxed__list {
    background: var(--color-dark-700);
    color: var(--color-dark-200);
}

html.dark .av-tabs-boxed__tab:hover,
html.dark .av-tabs-boxed__tab:focus {
    color: var(--color-dark-100);
}

html.dark .av-tabs-boxed__tab--active {
    background: var(--color-dark-500);
    color: var(--color-dark-50);
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.3);
}

/* av-info-section__title-block / __subtitle — opt-in extension of the
   canonical av-info-section header for cards that need a one-line
   description under the section title. Composes with av-section-title
   (Typo.h5) on top and Typo.body2 on the description. */
.av-info-section__title-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.av-info-section__title-block .av-section-title.mud-typography {
    margin: 0;
}

.av-info-section__subtitle.mud-typography {
    color: var(--color-gray-500);
    margin: 0;
}

html.dark .av-info-section__subtitle.mud-typography {
    color: var(--color-dark-300);
}

/* ────────────────────────────────────────────────────────────────────────
   av-family-* — Family tab visual skin (ViewContact > Family).
   Five cards stacked vertically: Header (no chevron), Current
   Relationships (chevron), Marriage Information (chevron), Marriage
   History (chevron + left badge), Family Members table (no chevron).
   ──────────────────────────────────────────────────────────────────────── */

.av-family-tab {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.av-family-card.av-card {
    padding: 0;
    overflow: hidden;
}

.av-family-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-gray-200);
}

html.dark .av-family-card__head {
    border-bottom-color: var(--color-dark-500);
}

.av-family-card__head-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
}

.av-family-card__body {
    padding: 14px 16px;
}

.av-family-card__chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--color-gray-500);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color 120ms ease, color 120ms ease;
    flex-shrink: 0;
}

html.dark .av-family-card__chevron {
    color: var(--color-dark-300);
}

.av-family-card__chevron:hover {
    background: var(--color-gray-100);
    color: var(--color-gray-700);
}

html.dark .av-family-card__chevron:hover {
    background: var(--color-dark-600);
    color: var(--color-dark-100);
}

.av-family-card__chevron .mud-icon-root {
    width: 18px;
    height: 18px;
    color: inherit;
    transition: transform 200ms ease;
}

.av-family-card__chevron.is-open .mud-icon-root {
    transform: rotate(180deg);
}

.av-family-card__head-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: var(--radius-sm);
    background: var(--color-gray-800);
    color: var(--color-white);
    flex-shrink: 0;
}

html.dark .av-family-card__head-badge {
    background: var(--color-dark-300);
    color: var(--color-dark-800);
}

.av-family-card__head-badge .mud-icon-root {
    width: 14px;
    height: 14px;
    color: inherit;
}

/* ── Header card ───────────────────────────────────────────────────────── */

.av-family-header__avatar.mud-avatar {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.av-family-header__title.mud-typography {
    color: var(--color-gray-800);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html.dark .av-family-header__title.mud-typography {
    color: var(--color-dark-50);
}

.av-family-header__menu-btn {
    margin-left: auto;
    color: var(--color-gray-500);
}

html.dark .av-family-header__menu-btn {
    color: var(--color-dark-300);
}

.av-family-header__rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.av-family-header__row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.av-family-header__row-label.mud-typography {
    color: var(--color-gray-500);
    min-width: 72px;
}

html.dark .av-family-header__row-label.mud-typography {
    color: var(--color-dark-300);
}

.av-family-header__row-value.mud-typography {
    color: var(--color-gray-800);
}

html.dark .av-family-header__row-value.mud-typography {
    color: var(--color-dark-100);
}

.av-family-header__row-value--accent.mud-typography {
    color: var(--color-primary-600);
}

html.dark .av-family-header__row-value--accent.mud-typography {
    color: var(--color-primary-400);
}

/* ── Current Relationships ────────────────────────────────────────────── */

.av-family-rel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.av-family-rel-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--color-gray-100);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    min-width: 0;
}

html.dark .av-family-rel-item {
    background: var(--color-dark-700);
    border-color: var(--color-dark-500);
}

.av-family-rel-item__avatar.mud-avatar {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.av-family-rel-item__text {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.av-family-rel-item__role.mud-typography {
    color: var(--color-gray-800);
    flex-shrink: 0;
}

html.dark .av-family-rel-item__role.mud-typography {
    color: var(--color-dark-50);
}

.av-family-rel-item__name.mud-typography {
    color: var(--color-primary-600);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

html.dark .av-family-rel-item__name.mud-typography {
    color: var(--color-primary-400);
}

.av-family-rel-item__chip.av-chip {
    flex-shrink: 0;
}

/* ── Marriage Information ─────────────────────────────────────────────── */

.av-family-marriage-panel {
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
}

html.dark .av-family-marriage-panel {
    border-color: var(--color-dark-500);
}

.av-family-marriage-panel__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--color-gray-100);
    border-bottom: 1px solid var(--color-gray-200);
}

html.dark .av-family-marriage-panel__head {
    background: var(--color-dark-700);
    border-bottom-color: var(--color-dark-500);
}

.av-family-marriage-panel__heart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--color-error);
    flex-shrink: 0;
}

.av-family-marriage-panel__heart .mud-icon-root {
    width: 22px;
    height: 22px;
    color: inherit;
}

.av-family-marriage-panel__title.mud-typography {
    color: var(--color-gray-700);
}

html.dark .av-family-marriage-panel__title.mud-typography {
    color: var(--color-dark-200);
}

.av-family-marriage-panel__title-name.mud-typography {
    color: var(--color-primary-600);
    margin-left: 4px;
}

html.dark .av-family-marriage-panel__title-name.mud-typography {
    color: var(--color-primary-400);
}

.av-family-marriage-panel__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    padding: 10px 12px 10px 54px;
}

.av-family-marriage-panel__meta-item {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}

.av-family-marriage-panel__meta-label.mud-typography {
    color: var(--color-gray-500);
}

html.dark .av-family-marriage-panel__meta-label.mud-typography {
    color: var(--color-dark-300);
}

.av-family-marriage-panel__meta-value.mud-typography {
    color: var(--color-gray-800);
}

html.dark .av-family-marriage-panel__meta-value.mud-typography {
    color: var(--color-dark-100);
}

.av-family-marriage-panel__meta-sep.mud-typography {
    color: var(--color-gray-400);
    padding: 0 4px;
}

html.dark .av-family-marriage-panel__meta-sep.mud-typography {
    color: var(--color-dark-400);
}

/* ── Marriage History ─────────────────────────────────────────────────── */

.av-family-history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.av-family-history-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.av-family-history-item__dash.mud-typography {
    color: var(--color-gray-400);
    flex-shrink: 0;
}

html.dark .av-family-history-item__dash.mud-typography {
    color: var(--color-dark-400);
}

.av-family-history-item__name.mud-typography {
    color: var(--color-gray-800);
    flex-shrink: 0;
}

html.dark .av-family-history-item__name.mud-typography {
    color: var(--color-dark-50);
}

.av-family-history-item__range.mud-typography {
    color: var(--color-gray-500);
}

html.dark .av-family-history-item__range.mud-typography {
    color: var(--color-dark-300);
}

/* ── Family Members table ─────────────────────────────────────────────── */

.av-family-members__name {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.av-family-members__name-avatar.mud-avatar {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.av-family-members__email.mud-typography {
    color: var(--color-primary-600);
}

html.dark .av-family-members__email.mud-typography {
    color: var(--color-primary-400);
}

/* ── Responsive ───────────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .av-family-rel-grid {
        grid-template-columns: 1fr;
    }

    .av-family-marriage-panel__meta {
        padding-left: 12px;
    }

    .av-family-header__row-label.mud-typography {
        min-width: 64px;
    }
}

/* ────────────────────────────────────────────────────────────────────────
   av-profile-header / av-page-eyebrow / av-back-link / av-priority —
   skin for the shared contact / company / household details header.
   ──────────────────────────────────────────────────────────────────────── */

/* Eyebrow above the back button: small uppercase tag + muted subtitle. */
.av-page-eyebrow {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 4px 4px;
}

.av-page-eyebrow__tag.mud-typography {
    color: var(--color-gray-500);
    letter-spacing: 0.08em;
}

html.dark .av-page-eyebrow__tag.mud-typography {
    color: var(--color-dark-300);
}

.av-page-eyebrow__subtitle.mud-typography {
    color: var(--color-gray-600);
}

html.dark .av-page-eyebrow__subtitle.mud-typography {
    color: var(--color-dark-200);
}

/* "Back to Contacts" — flat text button, no card chrome. */
.av-back-link-wrap {
    padding: 6px 0 10px;
}

.av-back-link.mud-button-root {
    text-transform: none;
    color: var(--color-gray-600);
    padding: 4px 8px;
    border-radius: var(--radius-md);
}

html.dark .av-back-link.mud-button-root {
    color: var(--color-dark-200);
}

.av-back-link.mud-button-root:hover {
    background: var(--color-gray-100);
    color: var(--color-gray-800);
}

html.dark .av-back-link.mud-button-root:hover {
    background: var(--color-dark-600);
    color: var(--color-dark-50);
}

.av-back-link .mud-icon-root {
    width: 16px;
    height: 16px;
}

/* ────────────────────────────────────────────────────────────────────────
   av-profile-header — Tailux-style contact details header.
   Layout (mobile-first, flex-row on >=1024px):
     [avatar column]  [identity column (grow)]  [priority column]
   ──────────────────────────────────────────────────────────────────────── */

.av-profile-header.av-card {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 24px 28px;
}

/* TOP ROW — avatar / identity / priority. Mobile = column, >=1024px = row.
   The responsive flex-row used to live on .av-profile-header.av-card itself,
   but the card now hosts both the top row AND the info row below the divider,
   so the row layout moved here. */
.av-profile-header__top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
}

@media (min-width: 1024px) {
    .av-profile-header__top {
        flex-direction: row;
        align-items: center;
        gap: 24px;
    }
}

/* Avatar column — favorite overlays the avatar, upload trigger below. */
.av-profile-header__avatar-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.av-profile-header__avatar-box {
    position: relative;
    width: 7rem;
    height: 7rem;
    flex-shrink: 0;
}

/* AvatarShared renders either an <img class="cv-avatar-img"> or a
   <div class="cv-avatar"> (initials fallback). Both get the same disc
   treatment so the layout doesn't shift between the two states.
   Size bumped to 7rem (112 px) to match the hero avatar in the
   contact details header. */
.av-profile-header__avatar-box .cv-avatar,
.av-profile-header__avatar-box .cv-avatar-img {
    width: 7rem;
    height: 7rem;
    border-radius: var(--radius-full);
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 26px;
    color: var(--color-white);
    background: linear-gradient(135deg,
                                var(--color-primary-500) 0%,
                                var(--color-primary-700) 100%);
}

/* AvatarShared renders BpFileUpload inside `.cv-upload-action`. That
   component owns both the hidden <InputFile> AND the visible MudButton
   acting as <label for="..."> — the latter is what actually opens the
   file picker. BpFileUpload randomizes the id at OnInitialized, so we
   CANNOT route clicks through an external <label> with a fixed id.
   Instead we keep the BpFileUpload MudButton visible and reshape it
   into a tiny pencil-icon circle overlapping the bottom-right corner of
   the avatar (Tailux's "edit avatar" affordance). */

/* Outer "ring" — 30×30 white disc anchored to the avatar's bottom-right
   corner with a -4 px outset (matches Tailux `-m-1`). `overflow:hidden`
   clips anything the Mud scaffolding tries to render beyond the disc,
   so the circle stays perfect no matter what MudGrid / MudStack do. */
.av-profile-header__avatar-box .cv-upload-action {
    position: absolute;
    bottom: -4px;
    right: -4px;
    z-index: 1;
    width: 30px;
    height: 30px;
    padding: 3px;
    box-sizing: border-box;
    background: var(--color-white);
    border-radius: var(--radius-full);
    line-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

html.dark .av-profile-header__avatar-box .cv-upload-action {
    background: var(--color-dark-700);
}

/* MudGrid / MudGridItem / MudStack scaffolding — collapse them to a 24×24
   slot so the button doesn't inherit `xs="12"` full-width / row-flex
   stretch. Width pinned + min-width / max-width clamp prevents Mud's
   `width:100%` from winning at higher specificity. */
.av-profile-header__avatar-box .cv-upload-action .mud-grid,
.av-profile-header__avatar-box .cv-upload-action .mud-grid-item,
.av-profile-header__avatar-box .cv-upload-action .mud-stack {
    margin: 0 !important;
    padding: 0 !important;
    width: 24px !important;
    min-width: 0 !important;
    max-width: 24px !important;
    height: 24px !important;
    flex-basis: 24px !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
    gap: 0 !important;
    align-items: center !important;
    justify-content: center !important;
}

/* The actual visible button — 24×24 gray circle. Five-class selector +
   !important wins against Mud's internal `min-width: 64px` etc. */
.av-profile-header.av-card .av-profile-header__avatar-box .cv-upload-action .mud-button-root {
    margin: 0 !important;
    padding: 0 !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    border: none !important;
    background: var(--color-gray-150, #ebebeb) !important;
    color: var(--color-gray-900) !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    border-radius: var(--radius-full) !important;
    box-shadow: none !important;
    transition: background-color 120ms ease;
}

html.dark .av-profile-header.av-card .av-profile-header__avatar-box .cv-upload-action .mud-button-root {
    background: var(--color-dark-600) !important;
    color: var(--color-dark-50) !important;
}

.av-profile-header.av-card .av-profile-header__avatar-box .cv-upload-action .mud-button-root:hover {
    background: var(--color-gray-200) !important;
}

html.dark .av-profile-header.av-card .av-profile-header__avatar-box .cv-upload-action .mud-button-root:hover {
    background: var(--color-dark-500) !important;
}

/* Replace the "Upload Avatar" text inside the MudButton with a pencil
   glyph injected via ::before. The text node is collapsed (font-size 0)
   so only the icon shows. SVG path is Heroicons "PencilSquare" in mini /
   tabler-pencil style — matches the Tailux reference's edit affordance. */
.av-profile-header__avatar-box .cv-upload-action .mud-button-label {
    font-size: 0 !important;
    line-height: 0 !important;
    width: 100%;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.av-profile-header__avatar-box .cv-upload-action .mud-button-label::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin: 0;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='black'><path d='M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zM11.379 5.793L3 14.172V17h2.828l8.38-8.379-2.83-2.828z'/></svg>") no-repeat center / contain;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='black'><path d='M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zM11.379 5.793L3 14.172V17h2.828l8.38-8.379-2.83-2.828z'/></svg>") no-repeat center / contain;
    vertical-align: middle;
}

/* Favorite — small circular badge overlapping the top-right of the avatar.
   With the bumped 7rem (112 px) circular avatar, the badge sits INSIDE the
   disc at 10/10 from the corner instead of overflowing it with -4/-4. */
.av-profile-header__favorite {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
}

.av-profile-header__favorite .cv-favorite-btn {
    width: 26px;
    height: 26px;
    padding: 0;
    border-radius: var(--radius-full);
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.08);
    color: var(--color-gray-400);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

html.dark .av-profile-header__favorite .cv-favorite-btn {
    background: var(--color-dark-700);
    border-color: var(--color-dark-500);
    color: var(--color-dark-300);
}

.av-profile-header__favorite .cv-favorite-btn:hover:not(:disabled) {
    color: var(--color-warning);
    border-color: var(--color-warning);
    transform: scale(1.1);
}

.av-profile-header__favorite .cv-favorite-btn.active {
    color: var(--color-warning);
    border-color: rgb(from var(--color-warning) r g b / 0.35);
    background: rgb(from var(--color-warning) r g b / 0.12);
}

html.dark .av-profile-header__favorite .cv-favorite-btn.active {
    background: rgb(from var(--color-warning) r g b / 0.18);
}

.av-profile-header__favorite .cv-favorite-btn .mud-icon-root {
    width: 14px;
    height: 14px;
    color: inherit;
}

.av-profile-header__favorite .cv-favorite-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Identity column — name row + subtitle row. */
.av-profile-header__identity {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
}

@media (min-width: 1024px) {
    .av-profile-header__identity {
        align-items: flex-start;
    }
}

.av-profile-header__name-row {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    min-width: 0;
}

@media (min-width: 1024px) {
    .av-profile-header__name-row {
        justify-content: flex-start;
    }
}

.av-profile-header__name.mud-typography {
    color: var(--color-gray-800);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html.dark .av-profile-header__name.mud-typography {
    color: var(--color-dark-50);
}

/* Preferred name — sits inline next to the formal name like the Tailux
   Follow link. Primary color, no border, small text. */
.av-profile-header__preferred {
    color: var(--color-primary-600);
    font-size: 12px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html.dark .av-profile-header__preferred {
    color: var(--color-primary-400);
}

/* Pencil for "Edit Name & Identity" — small neutral disc. Matches the
   av-edit-btn pattern used on the PersonalInfo card so the affordance reads
   the same wherever it shows up. */
.av-profile-header__name-edit.mud-icon-button {
    width: 32px;
    height: 32px;
    min-width: 32px;
    padding: 0;
    border-radius: 9999px;
    color: var(--color-gray-500);
    background: var(--color-gray-100);
    transition: color 120ms ease, background-color 120ms ease;
}

html.dark .av-profile-header__name-edit.mud-icon-button {
    color: var(--color-dark-200);
    background: var(--color-dark-600);
}

.av-profile-header__name-edit.mud-icon-button:hover {
    color: var(--color-primary-600);
    background: rgb(from var(--color-primary-600) r g b / 0.10);
}

html.dark .av-profile-header__name-edit.mud-icon-button:hover {
    color: var(--color-primary-400);
    background: rgb(from var(--color-primary-400) r g b / 0.15);
}

.av-profile-header__name-edit .mud-icon-root {
    width: 16px;
    height: 16px;
}

/* ── Employment profile cards (Professional Information tab) ─────────────── */
.av-emp-card.mud-paper {
    border-radius: 12px;
}

.av-emp-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.av-emp-card__head-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.av-emp-card__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Delete reuses the name-edit chrome but hovers in the danger color. */
.av-emp-card__delete.mud-icon-button:hover {
    color: var(--color-error);
    background: rgb(from var(--color-error) r g b / 0.10);
}

html.dark .av-emp-card__delete.mud-icon-button:hover {
    color: var(--color-error-lighter);
    background: rgb(from var(--color-error-lighter) r g b / 0.15);
}

/* Even, responsive label/value grid so the details read cleanly. */
.av-emp-card__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px 24px;
}

.av-emp-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.av-emp-field__label.mud-typography {
    color: var(--color-gray-500);
}

html.dark .av-emp-field__label.mud-typography {
    color: var(--color-dark-300);
}

.av-emp-field__value.mud-typography {
    color: var(--color-gray-800);
    overflow-wrap: anywhere;
}

html.dark .av-emp-field__value.mud-typography {
    color: var(--color-dark-100);
}

/* ── Chips row — salutation pill + gender pill + sync badge + briefing.
   Sits directly below the name row, wraps gracefully on narrow widths. */
.av-profile-header__chips-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    justify-content: center;
}

@media (min-width: 1024px) {
    .av-profile-header__chips-row {
        justify-content: flex-start;
    }
}

/* Solid pill — base geometry. Filled background, white text, rounded
   rectangle (NOT pill-shape) to match the brand chip recipe.
   Typography (size/weight) comes from MudText Typo="Typo.subtitle2" on the
   markup side; this class owns only color, background, padding, geometry. */
.av-profile-header__pill.mud-typography {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 16px;
    border-radius: var(--radius-md);
    color: var(--color-white);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Salutation pill — brand primary (theme-aware via design tokens). */
.av-profile-header__pill--salutation {
    background: var(--color-primary-600);
}

html.dark .av-profile-header__pill--salutation {
    background: var(--color-primary-500);
}

/* Gender pill — success green. Used as a quick visual differentiator from
   the salutation chip; not semantic of state. */
.av-profile-header__pill--gender {
    background: var(--color-success);
}

html.dark .av-profile-header__pill--gender {
    background: var(--color-success-lighter, var(--color-success));
}

/* ── Divider between the top row and the info row. */
.av-profile-header__divider.mud-divider {
    width: 100%;
    margin: 20px 0 16px;
    border-color: var(--color-gray-200);
}

html.dark .av-profile-header__divider.mud-divider {
    border-color: var(--color-dark-500);
}

/* ── Info row — Email · Phone · Address · Place of Birth · Birthday,
   pipe-separated. Each item is a label + value pair; vertical "|" separators
   are painted with ::after on every item except the last (skipped via
   :last-child). Wraps on narrow viewports — the wrapped lines drop the
   separator. */
.av-profile-header__info-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 20px;
    width: 100%;
}

.av-profile-header__info-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    padding-right: 20px;
    color: var(--color-gray-700);
}

html.dark .av-profile-header__info-item {
    color: var(--color-dark-100);
}

.av-profile-header__info-item:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 16px;
    background: var(--color-gray-300);
}

html.dark .av-profile-header__info-item:not(:last-child)::after {
    background: var(--color-dark-400);
}

.av-profile-header__info-icon.mud-icon-root {
    width: 18px;
    height: 18px;
    color: var(--color-gray-500);
    flex-shrink: 0;
}

html.dark .av-profile-header__info-icon.mud-icon-root {
    color: var(--color-dark-300);
}

.av-profile-header__info-label.mud-typography {
    color: var(--color-gray-500);
    letter-spacing: 0.04em;
}

html.dark .av-profile-header__info-label.mud-typography {
    color: var(--color-dark-300);
}

.av-profile-header__info-value.mud-typography {
    color: var(--color-gray-800);
    font-weight: 600;
}

html.dark .av-profile-header__info-value.mud-typography {
    color: var(--color-dark-50);
}

/* Subtitle row — category type + briefing pill, inline. */
.av-profile-header__subtitle {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 2px;
}

@media (min-width: 1024px) {
    .av-profile-header__subtitle {
        justify-content: flex-start;
    }
}

.av-profile-header__category.mud-typography {
    color: var(--color-gray-600);
    text-transform: capitalize;
}

html.dark .av-profile-header__category.mud-typography {
    color: var(--color-dark-200);
}

.av-profile-header__category--individual.mud-typography {
    color: var(--color-primary-600);
}

html.dark .av-profile-header__category--individual.mud-typography {
    color: var(--color-primary-400);
}

.av-profile-header__category--company.mud-typography {
    color: var(--color-info);
}

.av-profile-header__category--family.mud-typography,
.av-profile-header__category--household.mud-typography {
    color: var(--color-success);
}

/* Briefing pill — outlined neutral. */
.av-profile-header__briefing {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    background: transparent;
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-full);
    color: var(--color-gray-700);
    font-size: 12px;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 120ms ease, border-color 120ms ease;
}

html.dark .av-profile-header__briefing {
    border-color: var(--color-dark-500);
    color: var(--color-dark-100);
}

.av-profile-header__briefing:hover {
    background: var(--color-gray-100);
    border-color: var(--color-gray-300);
}

html.dark .av-profile-header__briefing:hover {
    background: var(--color-dark-600);
    border-color: var(--color-dark-400);
}

.av-profile-header__briefing .mud-icon-root {
    width: 14px;
    height: 14px;
    color: var(--color-primary-600);
    flex-shrink: 0;
}

html.dark .av-profile-header__briefing .mud-icon-root {
    color: var(--color-primary-400);
}

.av-profile-header__briefing-kbd {
    display: inline-flex;
    align-items: center;
    padding: 1px 5px;
    background: var(--color-gray-100);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-sm);
    color: var(--color-gray-500);
    font-family: var(--font-mono);
    font-size: 10px;
    line-height: 1;
}

html.dark .av-profile-header__briefing-kbd {
    background: var(--color-dark-600);
    border-color: var(--color-dark-500);
    color: var(--color-dark-300);
}

/* Priority column — right rail (where the Tailux 3-dots menu sits). */
.av-profile-header__priority {
    flex-shrink: 0;
}

/* Google "Synced" badge — sits directly below the identity subtitle row.
   Reuses av-tag av-tag--success for the canonical success-darker tint.
   The MudText inside is a <span>, not a .mud-button-label, so force the
   inner typography to inherit the badge color. The Google brand SVG keeps
   its own multi-color fills regardless. */
.av-profile-header__google-sync.av-tag {
    align-self: center;
    margin: 0;
}

.av-profile-header__google-sync .mud-typography {
    color: inherit;
}

/* Mobile: identity column is centered (align-items: center on the parent),
   so the badge centers too — keep alignment in sync. */
@media (max-width: 639px) {
    .av-profile-header__google-sync.av-tag {
        align-self: center;
    }
}

/* Google "Push" button — the MudButton sibling of the __google-sync badge.
   Lives in the same chips-row, looks identical at rest but is interactive
   (click → push contact to Google). The .av-tag.av-tag--neutral pair owns
   the visual; this scoping only neutralizes Mud's internal margins/min
   metrics so the pill geometry matches the synced badge pixel-for-pixel. */
.av-profile-header__google-push.mud-button-root {
    align-self: center;
    margin: 0;
    min-height: auto;
    padding: 4px 8px;
}

.av-profile-header__google-push .mud-button-label {
    color: inherit;
}

/* MudButton's .mud-button-icon-start adds 8 px right-margin by default; the
   av-tag uses gap:4px on the host instead, so kill the Mud margin. */
.av-profile-header__google-push .mud-button-icon-start {
    margin: 0;
}

/* Google brand SVG inside the StartIcon must KEEP its multi-color fills —
   the av-tag's color cascade would otherwise repaint them via currentColor
   on any path that doesn't carry an explicit fill. The brand icon already
   has fills, this just guarantees its child <path>s aren't overridden. */
.av-profile-header__google-push .mud-button-icon-start .mud-icon-root,
.av-profile-header__google-push .mud-button-icon-start svg {
    width: 13px;
    height: 13px;
}

/* ── av-priority — Tailux-style priority chip ─────────────────────────── */

.av-priority {
    display: inline-flex;
    align-items: center;
}

/* Tailux badge recipe — `py-2` (2 px), `px-4` (16 px), `gap-2` (8 px),
   `rounded-full`, `border 1px`. Color + border-color + bg come from the
   per-bucket modifier below; the base selector only owns geometry.
   Native <button> reset (background:none, color:inherit, etc.) is forced
   so the host button doesn't paint over the bucket recipe. */
.av-priority__chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 2px 16px;
    border-radius: var(--radius-full);
    background: transparent;
    color: inherit;
    border: 1px solid transparent;
    cursor: pointer;
    font: inherit;
    transition: background-color 120ms ease, border-color 120ms ease;
}

.av-priority__chip.is-readonly {
    cursor: default;
}

.av-priority__chip-label.mud-typography {
    color: inherit;
    font-size: 12px;
}

.av-priority__chip-caret.mud-icon-root {
    width: 14px;
    height: 14px;
    color: currentColor;
    opacity: 0.7;
}

.av-priority__spinner {
    width: 14px;
    height: 14px;
}

.av-priority__chip--loading {
    background: var(--color-gray-100);
    cursor: progress;
}

/* Dot — inside the chip it inherits `currentColor` so the badge reads
   as a single hue. Inside the popover option rows it keeps the base
   bucket color (option text is neutral gray, so the dot has to carry
   the bucket signal on its own). */
.av-priority__dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: currentColor;
    flex-shrink: 0;
}

.av-priority__option--critical .av-priority__dot { background: var(--color-error); }
.av-priority__option--high     .av-priority__dot { background: var(--color-warning); }
.av-priority__option--medium   .av-priority__dot { background: var(--color-warning-light, var(--color-warning)); }
.av-priority__option--low      .av-priority__dot { background: var(--color-info); }
.av-priority__option--minimal  .av-priority__dot { background: var(--color-gray-400); }

/* Per-bucket chip recipe — Tailux `text-this-darker bg-this-darker/[0.07]
   border-this-darker/20`, dark mode flips to the `lighter` ramp. */
.av-priority__chip--critical {
    background: rgb(from var(--color-error-darker) r g b / 0.07);
    color: var(--color-error-darker);
    border-color: rgb(from var(--color-error-darker) r g b / 0.20);
}

html.dark .av-priority__chip--critical {
    background: rgb(from var(--color-error-lighter) r g b / 0.10);
    color: var(--color-error-lighter);
    border-color: rgb(from var(--color-error-lighter) r g b / 0.20);
}

.av-priority__chip--high {
    background: rgb(from var(--color-warning-darker) r g b / 0.07);
    color: var(--color-warning-darker);
    border-color: rgb(from var(--color-warning-darker) r g b / 0.20);
}

html.dark .av-priority__chip--high {
    background: rgb(from var(--color-warning-lighter) r g b / 0.10);
    color: var(--color-warning-lighter);
    border-color: rgb(from var(--color-warning-lighter) r g b / 0.20);
}

.av-priority__chip--medium {
    background: rgb(from var(--color-warning-darker) r g b / 0.05);
    color: var(--color-warning-darker);
    border-color: rgb(from var(--color-warning-darker) r g b / 0.16);
}

html.dark .av-priority__chip--medium {
    background: rgb(from var(--color-warning-lighter) r g b / 0.08);
    color: var(--color-warning-lighter);
    border-color: rgb(from var(--color-warning-lighter) r g b / 0.16);
}

.av-priority__chip--low {
    background: rgb(from var(--color-info-darker) r g b / 0.07);
    color: var(--color-info-darker);
    border-color: rgb(from var(--color-info-darker) r g b / 0.20);
}

html.dark .av-priority__chip--low {
    background: rgb(from var(--color-info-lighter) r g b / 0.10);
    color: var(--color-info-lighter);
    border-color: rgb(from var(--color-info-lighter) r g b / 0.20);
}

.av-priority__chip--minimal {
    background: rgb(from var(--color-gray-700) r g b / 0.05);
    color: var(--color-gray-700);
    border-color: rgb(from var(--color-gray-700) r g b / 0.18);
}

html.dark .av-priority__chip--minimal {
    background: rgb(from var(--color-dark-200) r g b / 0.08);
    color: var(--color-dark-200);
    border-color: rgb(from var(--color-dark-200) r g b / 0.20);
}

/* Popover & option rows. */
.av-priority__popover .mud-list {
    padding: 4px;
    min-width: 200px;
}

.av-priority__option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px;
    border-radius: var(--radius-md);
    min-width: 0;
    width: 100%;
}

.av-priority__option-label.mud-typography {
    color: var(--color-gray-800);
    flex: 1 1 auto;
    min-width: 0;
}

html.dark .av-priority__option-label.mud-typography {
    color: var(--color-dark-100);
}

.av-priority__option-rank.mud-typography {
    color: var(--color-gray-400);
    font-family: var(--font-mono);
    flex-shrink: 0;
}

html.dark .av-priority__option-rank.mud-typography {
    color: var(--color-dark-400);
}

.av-priority__option-check.mud-icon-root {
    width: 14px;
    height: 14px;
    color: var(--color-primary-600);
    flex-shrink: 0;
}

html.dark .av-priority__option-check.mud-icon-root {
    color: var(--color-primary-400);
}

.av-priority__option.is-active {
    background: rgb(from var(--color-primary-500) r g b / 0.08);
}

html.dark .av-priority__option.is-active {
    background: rgb(from var(--color-primary-400) r g b / 0.14);
}

/* ── Responsive — priority chip alignment ─────────────────────────────── */

/* On mobile the priority chip sits at the top-right corner (absolute);
   the av-priority widget itself stays right-aligned. On desktop it joins
   the flex row and reverts to start-aligned for consistency with the rest
   of the card. */
@media (min-width: 1024px) {
    .av-priority {
        align-items: flex-end;
    }
}

/* ────────────────────────────────────────────────────────────────────────
   av-phone-row — Soft single-line card (one card per phone). Order on
   the row: type chip → phone number (grows) → extension → primary star
   → remove. Card stays white in both modes; primary state ONLY tints
   the 4 px left accent in the brand primary (no bg fill).
   ──────────────────────────────────────────────────────────────────────── */

.av-phone-rows {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.av-phone-rows__add.mud-button-root {
    margin-top: 8px;
    text-transform: none;
    letter-spacing: 0;
    border-radius: var(--radius-full);
    align-self: flex-start;
}

.av-phone-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-left: 4px solid transparent;
    border-radius: var(--radius-lg);
    box-shadow:
        0 0 2px rgb(145 158 171 / 0.15),
        0 8px 18px -6px rgb(145 158 171 / 0.10);
    transition: border-color 120ms ease, box-shadow 120ms ease;
    min-width: 0;
}

html.dark .av-phone-row {
    background: var(--color-dark-700);
    border-color: var(--color-dark-500);
    border-left-color: transparent;
    box-shadow: none;
}

.av-phone-row:hover {
    border-color: var(--color-gray-300);
}

html.dark .av-phone-row:hover {
    border-color: var(--color-dark-400);
}

/* Primary modifier — only the left accent flips to primary. Card stays
   white, no background tint. The 1 px outer border keeps its neutral
   gray so the card doesn't shout. */
.av-phone-row--primary {
    border-left-color: var(--color-primary-600);
}

html.dark .av-phone-row--primary {
    border-left-color: var(--color-primary-400);
}

/* Cell sizing — type and ext stay compact, phone grows. */
.av-phone-row__type {
    flex-shrink: 0;
}

.av-phone-row__phone {
    flex: 1 1 auto;
    min-width: 200px;
    position: relative;
}

/* Pull the error / helper text out of the row's flex flow so it does NOT
   add height to the phone input cell. Without this, `align-items: center`
   re-centers every sibling (Type chip, Extension, primary star, trash)
   against the bigger phone-input box the moment "Too long" / "Invalid"
   appears underneath — making the row look misaligned. Absolute positioning
   anchors the message to the input's bottom edge while keeping the row's
   geometry constant. */
.av-phone-row__phone .mud-input-control-helper-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 2px;
    pointer-events: none;
}

.av-phone-row__ext {
    width: 95px;
    flex-shrink: 0;
}

/* Type chip — pill activator for the MudMenu. Soft gray neutral so it
   doesn't compete with the row's primary accent; hover bumps the bg one
   step. Color, bg, border come from the surface tokens — geometry only
   in here, typography handled by the inner MudText `Typo.body2`. */
.av-phone-row__type-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    background: var(--color-gray-100);
    color: var(--color-gray-700);
    border: 1px solid var(--color-gray-200);
    cursor: pointer;
    font: inherit;
    transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
    min-width: 96px;
}

.av-phone-row__type-chip:hover {
    background: var(--color-gray-200);
    border-color: var(--color-gray-300);
    color: var(--color-gray-900);
}

html.dark .av-phone-row__type-chip {
    background: var(--color-dark-500);
    color: var(--color-dark-100);
    border-color: var(--color-dark-400);
}

html.dark .av-phone-row__type-chip:hover {
    background: var(--color-dark-400);
    color: var(--color-dark-50);
}

.av-phone-row__type-chip-label.mud-typography {
    color: inherit;
    flex: 1 1 auto;
    text-align: left;
}

.av-phone-row__type-chip-caret.mud-icon-root {
    width: 14px;
    height: 14px;
    color: currentColor;
    opacity: 0.7;
    flex-shrink: 0;
}

/* Primary star — when set: solid star, primary color, decorative.
   When not: outlined star icon-button that promotes this phone on click. */
.av-phone-row__primary-icon.mud-icon-root {
    width: 22px;
    height: 22px;
    color: var(--color-primary-600);
    flex-shrink: 0;
}

html.dark .av-phone-row__primary-icon.mud-icon-root {
    color: var(--color-primary-400);
}

.av-phone-row__primary-btn.mud-icon-button {
    color: var(--color-gray-400);
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.av-phone-row__primary-btn.mud-icon-button:hover {
    background-color: rgb(from var(--color-primary-600) r g b / 0.08);
    color: var(--color-primary-600);
}

html.dark .av-phone-row__primary-btn.mud-icon-button {
    color: var(--color-dark-300);
}

html.dark .av-phone-row__primary-btn.mud-icon-button:hover {
    background-color: rgb(from var(--color-primary-400) r g b / 0.16);
    color: var(--color-primary-400);
}

.av-phone-row__remove.mud-icon-button {
    color: var(--color-gray-400);
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.av-phone-row__remove.mud-icon-button:hover:not(:disabled) {
    background-color: rgb(from var(--color-error) r g b / 0.10);
    color: var(--color-error);
}

html.dark .av-phone-row__remove.mud-icon-button {
    color: var(--color-dark-300);
}

/* Responsive: below 720 px the row wraps so the phone input still fits;
   the secondary cells line up below it. */
@media (max-width: 720px) {
    .av-phone-row {
        flex-wrap: wrap;
    }

    .av-phone-row__phone {
        flex-basis: 100%;
        order: 1;
    }

    .av-phone-row__type {
        order: 0;
    }

    .av-phone-row__ext {
        order: 2;
    }
}

/* ────────────────────────────────────────────────────────────────────────
   av-property-address — redesigned address card for ViewProperty's
   AddressesTab. Composes with .av-card + .av-info-section: header with
   icon disc + title block + actions; 2-col field grid; notes block.
   ──────────────────────────────────────────────────────────────────────── */

.av-property-address.av-card {
    padding: 16px 20px;
    margin-top: 16px;
}

/* Icon disc — tinted primary circle that anchors the header. Sizes
   match the section-header rhythm (28×28 px so it sits comfortably next
   to a Typo.h5 title). */
.av-property-address__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-lg);
    background: rgb(from var(--color-primary-500) r g b / 0.12);
    color: var(--color-primary-600);
    flex-shrink: 0;
}

html.dark .av-property-address__icon {
    background: rgb(from var(--color-primary-400) r g b / 0.18);
    color: var(--color-primary-300);
}

.av-property-address__icon .mud-icon-root {
    width: 18px;
    height: 18px;
    color: inherit;
}

/* Field grid — two columns at desktop, single column on mobile. Inherits
   the av-info-field label/value typography (overline + body1). Inter-row
   gap matches the rest of the av-info-section family (16 px). */
.av-property-address__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px 24px;
    margin-top: 16px;
}

@media (max-width: 640px) {
    .av-property-address__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }
}

/* Period field — pair of dates with an arrow between them. */
.av-property-address__period {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.av-property-address__period-arrow.mud-icon-root {
    width: 14px;
    height: 14px;
    color: var(--color-gray-400);
    flex-shrink: 0;
}

html.dark .av-property-address__period-arrow.mud-icon-root {
    color: var(--color-dark-400);
}

/* Notes block — sticky-note icon + overline label header, body2 text
   underneath. Sits at the bottom of the card with a hairline divider
   above so it reads as its own section. */
.av-property-address__notes {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--color-gray-100);
}

html.dark .av-property-address__notes {
    border-top-color: var(--color-dark-600);
}

.av-property-address__notes-head {
    margin-bottom: 4px;
}

.av-property-address__notes-icon.mud-icon-root {
    width: 14px;
    height: 14px;
    color: var(--color-gray-500);
}

html.dark .av-property-address__notes-icon.mud-icon-root {
    color: var(--color-dark-300);
}

.av-property-address__notes-text.mud-typography {
    color: var(--color-gray-700);
}

html.dark .av-property-address__notes-text.mud-typography {
    color: var(--color-dark-200);
}

/* ============================================================
   Notification detail dialog (read-only)
   Shared/Dialog/NotificationDetailDialog. Info-only modal opened from the
   bell preview: fixed header (category icon + title + chip + close), a
   scrollable body, and a fixed footer with Close + optional "Go to". Spacing
   mirrors the form-dialog rhythm for visual consistency. Light + dark.
   ============================================================ */
.av-notif-detail.mud-dialog {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* Header (fixed) */
.av-notif-detail .mud-dialog-title {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding: 12px 16px;
    background: var(--color-gray-200);
    border-bottom: 1px solid var(--color-gray-100);
}

html.dark .av-notif-detail .mud-dialog-title {
    background: var(--color-dark-800);
    border-bottom-color: var(--color-dark-600);
}

.av-notif-detail__title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.av-notif-detail__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-lg);
    flex-shrink: 0;
    background: var(--mud-palette-action-disabled);
}

.av-notif-detail__icon.type-default {
    background: var(--mud-palette-grey-default, var(--color-gray-400));
}

.av-notif-detail__icon.type-info {
    background: var(--mud-palette-info);
}

.av-notif-detail__icon.type-success {
    background: var(--mud-palette-success);
}

.av-notif-detail__icon.type-warning {
    background: var(--mud-palette-warning);
}

.av-notif-detail__icon.type-error {
    background: var(--mud-palette-error);
}

.av-notif-detail__icon .mud-icon-root {
    width: 20px;
    height: 20px;
    color: var(--color-white);
}

.av-notif-detail__heading {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.av-notif-detail__title.mud-typography {
    color: var(--color-gray-800);
    word-break: break-word;
}

html.dark .av-notif-detail__title.mud-typography {
    color: var(--color-dark-50);
}

.av-notif-detail__chip.mud-chip {
    align-self: flex-start;
}

.av-notif-detail__close.mud-button-root {
    flex-shrink: 0;
    color: var(--color-gray-500);
}

html.dark .av-notif-detail__close.mud-button-root {
    color: var(--color-dark-300);
}

/* Body (scrollable) */
.av-notif-detail .mud-dialog-content {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 16px;
}

.av-notif-detail__body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.av-notif-detail__section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.av-notif-detail__message-box {
    padding: 12px 14px;
    border-radius: var(--radius-lg);
    background: var(--color-gray-100);
    border: 1px solid var(--color-gray-150);
}

html.dark .av-notif-detail__message-box {
    background: var(--color-dark-700);
    border-color: var(--color-dark-600);
}

.av-notif-detail__message.mud-typography {
    color: var(--color-gray-800);
    white-space: pre-wrap;
    word-break: break-word;
}

html.dark .av-notif-detail__message.mud-typography {
    color: var(--color-dark-100);
}

.av-notif-detail__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.av-notif-detail__meta-cell {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-gray-150);
    background: var(--surface-1);
}

html.dark .av-notif-detail__meta-cell {
    border-color: var(--color-dark-600);
    background: var(--color-dark-700);
}

.av-notif-detail__meta-cell .av-notif-detail__chip {
    align-self: flex-start;
}

.av-notif-detail__received {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--color-gray-700);
}

html.dark .av-notif-detail__received {
    color: var(--color-dark-200);
}

.av-notif-detail__received-icon.mud-icon-root {
    width: 15px !important;
    height: 15px !important;
    font-size: 15px !important;
    color: var(--color-gray-400);
    flex-shrink: 0;
}

html.dark .av-notif-detail__received-icon.mud-icon-root {
    color: var(--color-dark-400);
}

/* Details — definition-list card with hairline dividers */
.av-notif-detail__fields {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-gray-150);
    overflow: hidden;
}

html.dark .av-notif-detail__fields {
    border-color: var(--color-dark-600);
}

.av-notif-detail__field-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 12px;
}

.av-notif-detail__field-row + .av-notif-detail__field-row {
    border-top: 1px solid var(--color-gray-100);
}

html.dark .av-notif-detail__field-row + .av-notif-detail__field-row {
    border-top-color: var(--color-dark-600);
}

.av-notif-detail__field-label.mud-typography {
    color: var(--color-gray-500);
    flex-shrink: 0;
}

html.dark .av-notif-detail__field-label.mud-typography {
    color: var(--color-dark-300);
}

.av-notif-detail__field-value.mud-typography {
    color: var(--color-gray-800);
    text-align: right;
    word-break: break-word;
}

html.dark .av-notif-detail__field-value.mud-typography {
    color: var(--color-dark-100);
}

/* Footer (fixed) */
.av-notif-detail .mud-dialog-actions {
    flex: 0 0 auto;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid var(--color-gray-100);
    background: var(--surface-1);
}

html.dark .av-notif-detail .mud-dialog-actions {
    border-top-color: var(--color-dark-600);
}

.av-notif-detail__btn-cancel.mud-button-root,
.av-notif-detail__btn-action.mud-button-root {
    border-radius: 9999px;
}

.av-notif-detail__btn-cancel.mud-button-root {
    color: var(--color-gray-700);
    border: 1px solid var(--color-gray-300);
}

html.dark .av-notif-detail__btn-cancel.mud-button-root {
    color: var(--color-dark-100);
    border-color: var(--color-dark-500);
}

.av-notif-detail__btn-action.mud-button-root {
    background: var(--color-primary-600);
    color: var(--color-white);
}

.av-notif-detail__btn-action.mud-button-root:hover {
    background: var(--color-primary-700);
}

/* Footer secondary actions (toggle read / delete) pinned to the left so the
   primary Close / Go to sit on the right. */
.av-notif-detail__action-group {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-right: auto;
}

.av-notif-detail__icon-action.mud-button-root {
    color: var(--color-gray-600);
}

/* Neutral hover first — color modifiers below override it (equal specificity,
   later source wins) so the toggle/delete tints take precedence. */
.av-notif-detail__icon-action.mud-button-root:hover {
    background: rgb(from var(--color-gray-500) r g b / 0.12);
    color: var(--color-gray-900);
}

/* Toggle read/unread — primary tint on hover */
.av-notif-detail__icon-action--primary.mud-button-root:hover {
    background: rgb(from var(--color-primary-500) r g b / 0.12);
    color: var(--color-primary-600);
}

/* Delete — danger tint on hover */
.av-notif-detail__icon-action--danger.mud-button-root:hover {
    background: rgb(from var(--mud-palette-error) r g b / 0.12);
    color: var(--mud-palette-error);
}

html.dark .av-notif-detail__icon-action.mud-button-root {
    color: var(--color-dark-200);
}

html.dark .av-notif-detail__icon-action.mud-button-root:hover {
    background: rgb(from var(--color-dark-400) r g b / 0.40);
    color: var(--color-dark-50);
}

html.dark .av-notif-detail__icon-action--primary.mud-button-root:hover {
    background: rgb(from var(--color-primary-400) r g b / 0.20);
    color: var(--color-primary-300);
}

html.dark .av-notif-detail__icon-action--danger.mud-button-root:hover {
    background: rgb(from var(--mud-palette-error) r g b / 0.18);
    color: var(--mud-palette-error);
}

/* ============================================================
   Notification dropdown panel — Tailux refinements
   Scoped under .notification-panel so the shared base classes
   (.notification-item, .notification-icon) reused by the full-page
   AllNotifications view stay untouched. Reuses showcase primitives
   (av-tabs-boxed, av-empty-state, av-btn, av-chip-soft) in the markup.
   ============================================================ */

/* The MudMenu popover IS the floating Tailux card. Neutralize its inner
   list/content padding + background so the panel sits flush — otherwise the
   white popover edge shows as a double border above/below the panel. */
.notification-menu-popover {
    border-radius: var(--radius-xl) !important;
    overflow: hidden;
    border: 1px solid var(--color-gray-200);
    box-shadow: var(--shadow-soft);
}

html.dark .notification-menu-popover {
    border-color: var(--color-dark-600);
    box-shadow: var(--shadow-lg);
}

.notification-menu-popover .mud-list,
.notification-menu-popover .mud-menu-list,
.notification-menu-popover .mud-popover-content {
    padding: 0 !important;
    background: transparent !important;
}

/* Panel no longer carries its own frame — the popover owns it (no double edge). */
.notification-panel {
    border: none;
    box-shadow: none;
    border-radius: 0;
}

/* Segmented filter (av-tabs-boxed) — stretch the 3 tabs to fill the header */
.notification-panel .notification-filter-tabs {
    margin: 8px 0 4px;
}

.notification-panel .notification-filter-tabs .av-tabs-boxed__list {
    display: flex;
    width: 100%;
}

.notification-panel .notification-filter-tabs .av-tabs-boxed__tab {
    flex: 1 1 0;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* List rows — Tailux hover surface + rounded corners, compact rhythm */
.notification-panel .notification-list-container {
    padding: 8px;
}

.notification-panel .date-group {
    gap: 2px;
}

.notification-panel .date-group + .date-group {
    margin-top: 2px;
}

.notification-panel .notification-item {
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius-lg);
    transition: background-color 150ms ease;
}

.notification-panel .notification-item:hover {
    background: var(--color-gray-100);
}

html.dark .notification-panel .notification-item:hover {
    background: var(--color-dark-600);
}

/* Unread emphasis — soft primary tint + dot */
.notification-panel .notification-item.unread {
    background: rgb(from var(--color-primary-500) r g b / 0.05);
}

.notification-panel .notification-item.unread:hover {
    background: rgb(from var(--color-primary-500) r g b / 0.10);
}

html.dark .notification-panel .notification-item.unread {
    background: rgb(from var(--color-primary-400) r g b / 0.08);
}

html.dark .notification-panel .notification-item.unread:hover {
    background: rgb(from var(--color-primary-400) r g b / 0.14);
}

/* Compact vertical rhythm inside the card (title / message / context) */
.notification-panel .notification-content {
    gap: 2px;
}

.notification-panel .notification-message {
    margin-top: 0;
}

/* Title row — icon + title + pill grouped left; time + dot pushed right */
.notification-panel .notification-title-row {
    gap: 6px;
}

.notification-panel .notification-title-row .notification-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    flex-shrink: 0;
}

.notification-panel .notification-title-row .notification-icon .mud-icon-root {
    width: 13px !important;
    height: 13px !important;
    font-size: 13px !important;
}

.notification-panel .notification-title-row .notification-title {
    flex: 0 1 auto;
    min-width: 0;
}

.notification-panel .notification-title-row .notification-type-chip {
    flex-shrink: 0;
}

.notification-panel .notification-title-row .notification-time {
    margin-left: auto;
    padding-left: 6px;
    flex-shrink: 0;
}

.notification-panel .notification-unread-dot {
    width: 7px;
    height: 7px;
    border-radius: 9999px;
    background: var(--color-primary-500);
    flex-shrink: 0;
}

html.dark .notification-panel .notification-unread-dot {
    background: var(--color-primary-400);
}

/* Context line — muted "Case 123 · SMS · John" meta when Data carries it */
.notification-panel .notification-context {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.notification-panel .notification-context-icon.mud-icon-root {
    width: 12px !important;
    height: 12px !important;
    font-size: 12px !important;
    color: var(--color-gray-400);
    flex-shrink: 0;
}

html.dark .notification-panel .notification-context-icon.mud-icon-root {
    color: var(--color-dark-400);
}

.notification-panel .notification-context-text {
    color: var(--color-gray-500);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html.dark .notification-panel .notification-context-text {
    color: var(--color-dark-300);
}

/* Actions float as a pill over the top-right (time) on hover — no reserved
   gutter, no layout shift. Reveal/transition come from the base rules. */
.notification-panel .notification-actions {
    position: absolute;
    top: 4px;
    right: 6px;
    gap: 2px;
    padding: 2px;
    border-radius: 9999px;
    background: var(--notif-bg);
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 0 0 1px rgb(0 0 0 / 0.04);
}

html.dark .notification-panel .notification-actions {
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 0 0 1px rgb(255 255 255 / 0.06);
}

/* Footer — clean bordered strip with a full-width flat primary action */
.notification-panel .notification-footer {
    padding: 8px;
    background: transparent;
    border-top: 1px solid var(--color-gray-100);
}

html.dark .notification-panel .notification-footer {
    border-top-color: var(--color-dark-600);
}

.notification-panel .notification-footer .av-btn {
    width: 100%;
}

/* ============================================================
   Avalme system-message dialog (Pages/SystemMessage/SystemMessageDialog)
   Tailux info dialog: accent icon disc + eyebrow + title in the header,
   message body, and av-btn actions. Accent color comes from the message type.
   ============================================================ */
.av-sysmsg .mud-dialog-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

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

.av-sysmsg__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    flex-shrink: 0;
}

.av-sysmsg__icon .mud-icon-root {
    width: 22px;
    height: 22px;
}

.av-sysmsg__icon--info {
    background: rgb(from var(--mud-palette-info) r g b / 0.14);
    color: var(--mud-palette-info);
}

.av-sysmsg__icon--success {
    background: rgb(from var(--mud-palette-success) r g b / 0.14);
    color: var(--mud-palette-success);
}

.av-sysmsg__icon--primary {
    background: rgb(from var(--color-primary-500) r g b / 0.14);
    color: var(--color-primary-600);
}

html.dark .av-sysmsg__icon--primary {
    color: var(--color-primary-300);
}

.av-sysmsg__icon--warning {
    background: rgb(from var(--mud-palette-warning) r g b / 0.14);
    color: var(--mud-palette-warning);
}

.av-sysmsg__head-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.av-sysmsg__eyebrow.mud-typography {
    color: var(--color-gray-500);
}

html.dark .av-sysmsg__eyebrow.mud-typography {
    color: var(--color-dark-300);
}

.av-sysmsg__title.mud-typography {
    color: var(--color-gray-800);
    word-break: break-word;
}

html.dark .av-sysmsg__title.mud-typography {
    color: var(--color-dark-50);
}

.av-sysmsg__close.mud-button-root {
    flex-shrink: 0;
    color: var(--color-gray-500);
}

html.dark .av-sysmsg__close.mud-button-root {
    color: var(--color-dark-300);
}

.av-sysmsg__body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.av-sysmsg__content.mud-typography {
    color: var(--color-gray-700);
    word-break: break-word;
}

html.dark .av-sysmsg__content.mud-typography {
    color: var(--color-dark-200);
}

.av-sysmsg__link.mud-button-root {
    align-self: flex-start;
}

/* Push "Don't show again" to the left; Close stays on the right */
.av-sysmsg__btn-dismiss.mud-button-root {
    margin-right: auto;
    color: var(--color-gray-500);
    transition: background-color 150ms ease, color 150ms ease;
}

/* Clear, neutral hover (the flat default tint is too faint without an accent) */
.av-sysmsg__btn-dismiss.mud-button-root:hover {
    background-color: var(--color-gray-100) !important;
    color: var(--color-gray-900) !important;
}

html.dark .av-sysmsg__btn-dismiss.mud-button-root {
    color: var(--color-dark-300);
}

html.dark .av-sysmsg__btn-dismiss.mud-button-root:hover {
    background-color: rgb(from var(--color-dark-400) r g b / 0.40) !important;
    color: var(--color-dark-50) !important;
}


/* ============================================================
   Loan Officer Pipeline view — moved from inline <style>
   (NewLoanOfficerApp1003PipelinesView). HEX -> tokens.
   ============================================================ */

    /* Pipeline Summary Active Card */
    .pipeline-card-active {
        border: 2px solid var(--color-primary-600) !important;
        box-shadow: 0 4px 12px rgb(from var(--color-primary-500) r g b / 0.15) !important;
    }

    .pipeline-row {
        cursor: pointer;
    }

    /* ===== Attention indicator (single badge with multi-section tooltip) ===== */
    .pipeline-attention-badge .mud-badge {
        font-size: 0.625rem;
        height: 16px;
        min-width: 16px;
        padding: 0 4px;
    }

    .pipeline-attention-tooltip {
        display: flex;
        flex-direction: column;
        gap: 6px;
        max-width: 280px;
        text-align: left;
    }

    .pipeline-attention-tooltip-title {
        font-weight: 600;
        font-size: 0.75rem;
        color: var(--mud-palette-warning);
        text-transform: uppercase;
        letter-spacing: 0.04em;
        padding-bottom: 4px;
        border-bottom: 1px solid color-mix(in srgb, var(--mud-palette-warning) 25%, transparent);
    }

    .pipeline-attention-tooltip-row {
        display: flex;
        flex-direction: column;
        gap: 2px;
        font-size: 0.75rem;
        line-height: 1.35;
    }

    .pipeline-attention-tooltip-section {
        font-weight: 600;
        color: var(--mud-palette-text-primary);
    }

    .pipeline-attention-tooltip-cause {
        color: var(--mud-palette-text-secondary);
        font-style: italic;
    }

    /* ===== Borrower contact card (popover) ===== */
    .borrower-contact-anchor {
        position: relative;
        display: inline-flex;
    }

    .borrower-contact-trigger {
        all: unset;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        border-radius: 8px;
        cursor: pointer;
        color: var(--mud-palette-primary);
        background: color-mix(in srgb, var(--mud-palette-primary) 8%, transparent);
        transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    }

    .borrower-contact-trigger:hover {
        background: color-mix(in srgb, var(--mud-palette-primary) 16%, transparent);
        transform: translateY(-1px);
        box-shadow: 0 2px 8px color-mix(in srgb, var(--mud-palette-primary) 25%, transparent);
    }

    /* Popover — eleva por encima del overlay del click-outside */
    .borrower-contact-popover {
        z-index: 1110 !important;
    }

    .borrower-contact-popover.mud-popover {
        background: transparent;
        box-shadow: none;
        overflow: visible;
    }

    .borrower-contact-card {
        position: relative;
        width: 320px;
        min-height: 230px;
        font-family: var(--font-sans);
        background: var(--mud-palette-surface);
        color: var(--mud-palette-text-primary);
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 24px 48px rgba(0, 0, 0, 0.10), 0 4px 12px rgba(0, 0, 0, 0.06);
        text-align: left;
    }

    .borrower-contact-card-header {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 16px;
        background: linear-gradient(135deg,
            color-mix(in srgb, var(--mud-palette-primary) 12%, transparent) 0%,
            color-mix(in srgb, var(--mud-palette-secondary) 10%, transparent) 100%);
        border-bottom: 1px solid color-mix(in srgb, var(--mud-palette-primary) 12%, transparent);
    }

    .borrower-contact-avatar {
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: 1rem;
        letter-spacing: 0.5px;
        color: var(--color-white);
        background: linear-gradient(135deg, var(--mud-palette-primary) 0%, var(--mud-palette-secondary) 100%);
        box-shadow: 0 4px 12px color-mix(in srgb, var(--mud-palette-primary) 35%, transparent);
    }

    .borrower-contact-headline {
        min-width: 0;
        flex: 1;
    }

    .borrower-contact-name {
        font-weight: 600;
        font-size: 0.95rem;
        color: var(--mud-palette-text-primary);
        line-height: 1.2;
    }

    .borrower-contact-subtitle {
        font-size: 0.6875rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--mud-palette-text-secondary);
        margin-top: 2px;
    }

    /* ===== Applicants avatar group (UX 3 — coborrowers en columna AllApplicantsEmails) ===== */
    .applicants-avatar-group {
        display: inline-flex;
        align-items: center;
    }

    .applicants-avatar-stack-item {
        margin-left: -6px;
        position: relative;
    }

    .applicants-avatar-stack-item:first-child {
        margin-left: 0;
    }

    .applicants-avatar-trigger {
        all: unset;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        cursor: pointer;
        font-size: 0.6875rem;
        font-weight: 700;
        letter-spacing: 0.02em;
        color: var(--color-white);
        background: linear-gradient(135deg, var(--mud-palette-primary) 0%, var(--mud-palette-secondary) 100%);
        border: 2px solid var(--mud-palette-surface);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
        transition: transform 0.15s ease, box-shadow 0.15s ease, z-index 0s;
    }

    .applicants-avatar-trigger:hover {
        transform: translateY(-2px) scale(1.08);
        box-shadow: 0 4px 10px color-mix(in srgb, var(--mud-palette-primary) 35%, transparent);
        z-index: 5;
    }

    .applicants-avatar-stack-item:hover {
        z-index: 5;
    }

    .borrower-contact-card-body {
        padding: 12px 16px;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .borrower-contact-row {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 0.8125rem;
        color: var(--mud-palette-text-primary);
    }

    .borrower-contact-row-multi {
        align-items: flex-start;
    }

    .borrower-contact-row .mud-icon-root {
        color: var(--mud-palette-text-secondary);
        flex: 0 0 18px;
    }

    .borrower-contact-value {
        flex: 1;
        word-break: break-word;
        line-height: 1.4;
    }

    .borrower-contact-tag {
        font-size: 0.6875rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        padding: 1px 6px;
        border-radius: 6px;
        color: var(--mud-palette-text-secondary);
        background: color-mix(in srgb, var(--mud-palette-text-secondary) 10%, transparent);
    }

    .borrower-contact-copy {
        flex: 0 0 22px;
        width: 22px;
        height: 22px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 6px;
        cursor: pointer;
        color: var(--mud-palette-text-secondary);
        background: transparent;
        transition: background 0.15s ease, color 0.15s ease;
    }

    .borrower-contact-copy:hover {
        color: var(--mud-palette-primary);
        background: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent);
    }

    .borrower-contact-copy .mud-icon-root {
        color: inherit;
        font-size: 14px;
        flex: none;
    }

    /* Link/empty inside contact rows */
    .borrower-contact-link {
        color: var(--mud-palette-primary);
        text-decoration: none;
    }

    .borrower-contact-link:hover {
        text-decoration: underline;
    }

    .borrower-contact-empty {
        color: var(--mud-palette-text-disabled);
        font-style: italic;
    }

    /* Close button (X) en el header */
    .borrower-contact-close {
        all: unset;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 26px;
        height: 26px;
        border-radius: 6px;
        cursor: pointer;
        color: var(--mud-palette-text-secondary);
        transition: background 0.15s ease, color 0.15s ease;
    }

    .borrower-contact-close:hover {
        background: color-mix(in srgb, var(--mud-palette-error) 12%, transparent);
        color: var(--mud-palette-error);
    }

    /* Skeleton estático (mientras el fetch está en curso) */
    .borrower-contact-skeleton-static {
        display: block;
    }

    .borrower-contact-skeleton-avatar {
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: color-mix(in srgb, var(--mud-palette-text-secondary) 14%, transparent);
        background-image: linear-gradient(90deg,
            transparent 0%,
            color-mix(in srgb, var(--mud-palette-surface) 60%, transparent) 50%,
            transparent 100%);
        background-size: 200% 100%;
        animation: borrower-contact-shimmer 1.2s infinite linear;
    }

    .borrower-contact-skeleton-headline {
        flex: 1;
    }

    .borrower-contact-skeleton-row {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .borrower-contact-skeleton-dot {
        flex: 0 0 18px;
        width: 18px;
        height: 18px;
        border-radius: 4px;
        background: color-mix(in srgb, var(--mud-palette-text-secondary) 14%, transparent);
        background-image: linear-gradient(90deg,
            transparent 0%,
            color-mix(in srgb, var(--mud-palette-surface) 60%, transparent) 50%,
            transparent 100%);
        background-size: 200% 100%;
        animation: borrower-contact-shimmer 1.2s infinite linear;
    }

    .borrower-contact-skeleton-line {
        height: 10px;
        border-radius: 6px;
        background: color-mix(in srgb, var(--mud-palette-text-secondary) 14%, transparent);
        background-image: linear-gradient(90deg,
            transparent 0%,
            color-mix(in srgb, var(--mud-palette-surface) 60%, transparent) 50%,
            transparent 100%);
        background-size: 200% 100%;
        animation: borrower-contact-shimmer 1.2s infinite linear;
    }

    @keyframes borrower-contact-shimmer {
        0%   { background-position: 200% 0; }
        100% { background-position: -200% 0; }
    }
