/* RoPrint — overrides finos sobre MudBlazor + clases de componentes propios.
   Mantiene la API de Mud pero alinea colores, micro-interacciones y motion a la marca.
   Usa SOLO tokens de tokens.css — nunca hex hardcodeado aquí. */

/* === Tipografía base de Mud === */
.mud-typography,
.mud-input-label,
.mud-input-control input,
.mud-select-input,
.mud-button {
    font-family: var(--rp-font-ui);
}

.mud-typography-h1,
.mud-typography-h2 {
    font-family: var(--rp-font-display);
    letter-spacing: 0.04em;
    font-weight: 400;
}

/* === MudButton === */
.mud-button {
    border-radius: var(--rp-radius-md);
    text-transform: none;
    font-weight: 600;
    letter-spacing: 0;
    transition:
        background-color var(--rp-motion-base) var(--rp-easing-standard),
        color var(--rp-motion-base) var(--rp-easing-standard),
        box-shadow var(--rp-motion-base) var(--rp-easing-standard),
        border-color var(--rp-motion-base) var(--rp-easing-standard),
        transform var(--rp-motion-fast) var(--rp-easing-standard);
}

.mud-button:active {
    transform: scale(0.98);
}

.mud-button-filled.mud-button-filled-primary {
    background-color: var(--rp-brand-green);
    color: #fff;
    box-shadow: var(--rp-shadow-sm);
}

.mud-button-filled.mud-button-filled-primary:hover {
    background-color: var(--rp-brand-forest);
    box-shadow: var(--rp-shadow-md);
}

.mud-button-outlined.mud-button-outlined-primary {
    border-color: var(--rp-brand-green);
    color: var(--rp-brand-green);
    border-width: 1.5px;
}

.mud-button-outlined.mud-button-outlined-primary:hover {
    background-color: var(--rp-brand-lime-soft);
    border-color: var(--rp-brand-green);
}

.mud-button-text.mud-button-text-primary {
    color: var(--rp-brand-green);
}

/* === MudIconButton micro-interacciones === */
.mud-icon-button {
    transition:
        background-color var(--rp-motion-fast) var(--rp-easing-standard),
        color var(--rp-motion-fast) var(--rp-easing-standard),
        transform var(--rp-motion-fast) var(--rp-easing-standard);
}

.mud-icon-button:active {
    transform: scale(0.94);
}

/* === MudPaper / cards === */
.mud-paper {
    border-radius: var(--rp-radius-md);
    transition: box-shadow var(--rp-motion-base) var(--rp-easing-standard),
                border-color var(--rp-motion-base) var(--rp-easing-standard);
}

.mud-paper.mud-elevation-0 {
    border: 1px solid var(--rp-line);
}

.rp-paper-interactive {
    cursor: pointer;
}

.rp-paper-interactive:hover {
    box-shadow: var(--rp-shadow-md);
    border-color: color-mix(in srgb, var(--rp-brand-green) 35%, var(--rp-line));
}

/* === MudTable === */
.mud-table-root {
    background-color: var(--rp-surface);
    border-radius: var(--rp-radius-md);
    box-shadow: var(--rp-shadow-sm);
    overflow: hidden;
}

.mud-table-root .mud-table-head {
    background-color: var(--rp-surface-2);
}

.mud-table-root .mud-table-head .mud-table-cell {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.06em;
    font-weight: 600;
    color: var(--rp-ink-muted);
    border-bottom: 1px solid var(--rp-line);
}

.mud-table-root .mud-table-body .mud-table-row {
    transition: background-color var(--rp-motion-fast) var(--rp-easing-standard),
                box-shadow var(--rp-motion-fast) var(--rp-easing-standard);
}

.mud-table-root .mud-table-body .mud-table-row:nth-of-type(even) > .mud-table-cell {
    background-color: color-mix(in srgb, var(--rp-surface-2) 50%, transparent);
}

.mud-table-root .mud-table-body .mud-table-row:hover > .mud-table-cell {
    background-color: color-mix(in srgb, var(--rp-brand-lime-soft) 32%, transparent);
}

.mud-table-root .mud-table-body .mud-table-row:hover > .mud-table-cell:first-child {
    box-shadow: inset 3px 0 0 0 var(--rp-brand-lime);
}

.mud-table-root .mud-table-body .mud-table-cell {
    border-bottom: 1px solid var(--rp-line);
    color: var(--rp-ink);
}

.mud-table-root .mud-table-foot .mud-table-cell {
    background-color: var(--rp-surface-2);
    font-weight: 600;
}

/* Sticky header opcional (clase aplicable a wrapper). */
.rp-table-sticky .mud-table-head {
    position: sticky;
    top: 0;
    z-index: var(--rp-z-sticky);
}

/* Densidad — afecta a TODA la página. Activado por <html class="rp-density-..."> */
.rp-density-comfortable .mud-table-cell {
    padding-top: 12px;
    padding-bottom: 12px;
}

.rp-density-compact .mud-table-cell {
    padding-top: 6px;
    padding-bottom: 6px;
}

/* === MudChip === */
.mud-chip {
    border-radius: var(--rp-radius-sm);
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* === Inputs === */
.mud-input-outlined .mud-input-outlined-border {
    border-radius: var(--rp-radius-sm);
    transition: border-color var(--rp-motion-fast) var(--rp-easing-standard);
}

.mud-input.mud-input-outlined.mud-focused .mud-input-outlined-border {
    border-color: var(--rp-brand-green);
    border-width: 1.5px;
    box-shadow: var(--rp-focus-ring);
}

.mud-input-label.mud-input-label-animated.mud-input-label-text-primary,
.mud-input-label.mud-input-label-animated.mud-input-label-text-primary.mud-input-label-shrink {
    color: var(--rp-brand-green);
}

/* === Tabs activos === */
.mud-tabs .mud-tab.mud-tab-active {
    color: var(--rp-brand-forest);
}

.mud-tabs .mud-tab-slider {
    background-color: var(--rp-brand-lime);
    height: 3px;
}

/* === Tabs minimalistas (estilo Linear / GitHub Issues): underline puro,
       sin fondo coloreado, sin uppercase. Aplicar con class="rp-tabs-minimal". === */
.rp-tabs-minimal.mud-tabs,
.rp-tabs-minimal .mud-tabs-toolbar,
.rp-tabs-minimal .mud-tabs-tabbar {
    background-color: transparent !important;
    background: transparent !important;
    color: var(--rp-ink-muted);
    box-shadow: none !important;
    min-height: 0;
}

.rp-tabs-minimal .mud-tabs-tabbar-inner,
.rp-tabs-minimal .mud-tabs-tabbar-content {
    background: transparent !important;
}

.rp-tabs-minimal .mud-tabs-tabbar-wrapper {
    border-bottom: 1px solid var(--rp-line);
}

.rp-tabs-minimal .mud-tab {
    text-transform: none;
    letter-spacing: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--rp-ink-muted);
    min-height: 40px;
    min-width: 0;
    padding: 8px 16px;
    opacity: 1;
    transition: color 150ms ease;
}

.rp-tabs-minimal .mud-tab:hover {
    color: var(--rp-ink);
    background: transparent;
}

.rp-tabs-minimal .mud-tab.mud-tab-active {
    color: var(--rp-brand-forest);
    font-weight: 600;
}

.rp-tabs-minimal .mud-tab .mud-icon-root {
    margin-right: 6px;
    font-size: 18px !important;
}

.rp-tabs-minimal .mud-tab-slider {
    height: 2px;
    background-color: var(--rp-brand-forest);
}

/* === Aviso sutil para la pestaña Papelera (auto-purga 30 días) === */
.rp-trash-notice {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--rp-ink-muted);
    padding: 8px 12px;
    background: var(--rp-surface-2);
    border-radius: 8px;
}
.rp-trash-notice .mud-icon-root {
    font-size: 16px !important;
    color: var(--rp-ink-muted);
}

/* Acciones inline mobile: ocultas por defecto, se muestran solo en ≤600px. */
.rp-mobile-actions { display: none; }

/* === Ajustes responsive móvil (≤600px) === */
@media (max-width: 600px) {
    /* Container más ajustado */
    .rp-main .mud-container.pa-6,
    .rp-main .mud-container { padding: 16px !important; }

    /* PageHeader compacto y display más sobrio */
    .rp-page-header { padding: 12px 0 8px; gap: 12px; }
    .rp-page-header__title { font-size: 22px; letter-spacing: 0.02em; }
    .rp-page-header__subtitle { font-size: 13px; }
    .rp-page-header__actions { width: 100%; }
    .rp-page-header__actions > * { flex: 1 1 auto; min-width: 0; }

    /* FilterBar: filtros full-width */
    .rp-filter-bar { gap: 8px; }
    .rp-filter-bar > *,
    .rp-filter-bar .mud-input-control,
    .rp-filter-bar__filters,
    .rp-filter-bar__search { width: 100%; min-width: 0; flex-basis: 100%; }
    .rp-filter-bar__filters > * { width: 100%; }

    /* MudTable stacked: separar visualmente cada "tarjeta" de fila */
    .mud-table-cell { padding: 8px 12px !important; }
    .mud-table-row { border-bottom: 1px solid var(--rp-line); }
    .mud-table-row > td:first-child { padding-top: 12px !important; }
    .mud-table-row > td:last-child { padding-bottom: 12px !important; }

    /* Listados: ocultar celdas secundarias en móvil. La info sigue accesible
       al pinchar la fila (abre modal o detalle). */
    .rp-cell-secondary,
    .rp-cell-empty { display: none !important; }

    /* Acciones inline junto al valor principal de cada fila (sustituye a la
       columna Acciones que se oculta arriba). */
    .rp-mobile-actions {
        display: inline-flex;
        align-items: center;
        gap: 2px;
        margin-left: auto;
    }

    /* Tabs minimal con menos hueco */
    .rp-tabs-minimal .mud-tab { padding: 8px 12px; }
}

/* === Focus accesible === */
*:focus-visible {
    outline: 2px solid var(--rp-brand-green);
    outline-offset: 2px;
}

.mud-icon-button:focus-visible {
    outline-color: var(--rp-brand-lime);
}

/* === Selección de texto === */
::selection {
    background-color: var(--rp-brand-lime-soft);
    color: var(--rp-ink);
}

/* === Dialogs === */
.mud-dialog {
    border-radius: var(--rp-radius-lg);
    animation: rp-scale-in var(--rp-motion-base) var(--rp-easing-decelerate) both;
}

/* === Snackbar — top-right en desktop, bottom-center en mobile === */
@media (min-width: 600px) {
    .mud-snackbar-location-bottomcenter,
    .mud-snackbar-location-bottomleft,
    .mud-snackbar-location-bottomright {
        top: 16px !important;
        bottom: auto !important;
        right: 16px !important;
        left: auto !important;
    }
}

/* === StatusChip === */
.rp-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--rp-radius-pill);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.4;
    white-space: nowrap;
}

.rp-status-chip::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: currentColor;
    opacity: 0.85;
}

.rp-status--neutral { background: color-mix(in srgb, var(--rp-ink-muted) 16%, transparent); color: var(--rp-ink-muted); }
.rp-status--info    { background: var(--rp-info-soft); color: var(--rp-info); }
.rp-status--success { background: var(--rp-success-soft); color: var(--rp-success); }
.rp-status--warning { background: var(--rp-warning-soft); color: var(--rp-warning); }
.rp-status--danger  { background: var(--rp-danger-soft); color: var(--rp-danger); }
.rp-status--ink     { background: color-mix(in srgb, var(--rp-ink) 10%, transparent); color: var(--rp-ink); }

/* === KpiCard === */
.rp-kpi {
    background-color: var(--rp-surface);
    border: 1px solid var(--rp-line);
    border-radius: var(--rp-radius-md);
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: var(--rp-shadow-sm);
    position: relative;
    overflow: hidden;
    transition: box-shadow var(--rp-motion-base) var(--rp-easing-standard),
                border-color var(--rp-motion-base) var(--rp-easing-standard);
}

.rp-kpi:hover {
    box-shadow: var(--rp-shadow-md);
}

.rp-kpi__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.rp-kpi__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--rp-radius-sm);
    background: var(--rp-brand-lime-soft);
    color: var(--rp-brand-forest);
    flex-shrink: 0;
}

.rp-kpi__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    color: var(--rp-ink-muted);
}

.rp-kpi__value {
    font-family: var(--rp-font-display);
    letter-spacing: 0.04em;
    font-size: 44px;
    line-height: 1;
    color: var(--rp-ink);
}

.rp-kpi__caption {
    font-size: 12px;
    color: var(--rp-ink-muted);
}

.rp-kpi__sparkline {
    margin-top: 4px;
}

/* === PageHeader === */
.rp-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 0 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--rp-line);
    flex-wrap: wrap;
}

.rp-page-header__title {
    font-family: var(--rp-font-display);
    letter-spacing: 0.04em;
    font-size: 32px;
    line-height: 1.1;
    color: var(--rp-ink);
    margin: 0;
}

.rp-page-header__subtitle {
    color: var(--rp-ink-muted);
    font-size: 14px;
    margin-top: 4px;
}

.rp-page-header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* === EmptyState === */
.rp-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 64px 24px;
    gap: 12px;
    color: var(--rp-ink-muted);
}

.rp-empty__icon {
    font-size: 56px;
    color: var(--rp-ink-muted);
    opacity: 0.6;
}

.rp-empty__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--rp-ink);
}

.rp-empty__message {
    font-size: 14px;
    max-width: 360px;
}

/* === Sticky totals panel del QuoteEditor === */
.rp-totals-panel {
    background: var(--rp-surface);
    border: 1px solid var(--rp-line);
    border-radius: var(--rp-radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--rp-shadow-sm);
    position: sticky;
    top: calc(var(--rp-appbar-height) + 16px);
}

.rp-totals-panel__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 14px;
    color: var(--rp-ink-muted);
}

.rp-totals-panel__row strong {
    color: var(--rp-ink);
    font-weight: 600;
}

.rp-totals-panel__total {
    font-family: var(--rp-font-display);
    letter-spacing: 0.04em;
    font-size: 36px;
    line-height: 1;
    color: var(--rp-brand-forest);
}

.rp-totals-panel__divider {
    height: 1px;
    background: var(--rp-line);
    margin: 4px 0;
}

/* === Acabados inline en filas de QuoteEditor === */
.rp-finishings-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rp-finishing-row {
    display: grid;
    grid-template-columns: 1fr 70px 70px 32px;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--rp-ink-muted);
}

.rp-finishing-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rp-finishing-amount {
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: var(--rp-ink);
}

.rp-finishing-qty {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.rp-qty-input {
    max-width: 70px;
}

.rp-qty-input .mud-input-control {
    margin-top: 0;
}

.rp-text-muted {
    color: var(--rp-ink-muted);
}

/* === AppBar / Drawer / NavMenu — globales porque scoped CSS con ::deep no aplica con Mud === */
.rp-appbar {
    background-color: var(--rp-surface) !important;
    color: var(--rp-ink) !important;
    border-bottom: 1px solid var(--rp-line);
    box-shadow: none !important;
    height: var(--rp-appbar-height);
    min-height: var(--rp-appbar-height);
    gap: 8px;
}

.rp-appbar .mud-icon-button {
    color: var(--rp-ink-muted);
}

.rp-appbar .mud-icon-button:hover {
    color: var(--rp-brand-green);
    background-color: var(--rp-brand-lime-soft);
}

.rp-drawer {
    background-color: var(--rp-brand-deep) !important;
    color: rgba(255, 255, 255, 0.78);
    border: none !important;
}

.rp-drawer .mud-drawer-content {
    background-color: var(--rp-brand-deep);
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.rp-drawer .mud-nav-menu {
    flex: 1 1 auto;
    padding-top: 4px;
    padding-bottom: 4px;
}

.rp-drawer-header {
    padding: 18px 20px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    min-height: auto;
    flex: 0 0 auto;
}

.rp-drawer-footer {
    margin-top: auto;
    flex: 0 0 auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.38);
}

.rp-drawer-footer__app {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.55);
}

.rp-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    width: 100%;
}

.rp-brand__logo {
    display: block;
    height: 44px;
    width: auto;
    max-width: 100%;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

.rp-main {
    background-color: var(--rp-surface-2);
    min-height: 100vh;
}

/* Section labels dentro del NavMenu (Principal, Catálogo, Gestión) */
.rp-drawer .rp-nav-section {
    padding: 22px 20px 6px;
    color: rgba(255, 255, 255, 0.32);
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.14em;
    font-weight: 700;
}

.rp-drawer .rp-nav-section:first-child {
    padding-top: 14px;
}

/* Nav items: respiración lateral, esquinas suaves, transiciones */
.rp-drawer .mud-nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-weight: 500;
    padding: 9px 14px;
    margin: 1px 8px;
    border-radius: var(--rp-radius-sm);
    position: relative;
    transition:
        background-color var(--rp-motion-base) var(--rp-easing-standard),
        color var(--rp-motion-base) var(--rp-easing-standard);
}

.rp-drawer .mud-nav-link .mud-nav-link-icon {
    color: rgba(255, 255, 255, 0.62);
    margin-right: 14px;
    transition: color var(--rp-motion-base) var(--rp-easing-standard);
}

.rp-drawer .mud-nav-link:hover {
    background-color: rgba(139, 195, 74, 0.10);
    color: #FFFFFF;
}

.rp-drawer .mud-nav-link:hover .mud-nav-link-icon {
    color: #FFFFFF;
}

.rp-drawer .mud-nav-link.active {
    background-color: rgba(139, 195, 74, 0.20);
    color: #FFFFFF;
    font-weight: 600;
}

.rp-drawer .mud-nav-link.active::before {
    content: "";
    position: absolute;
    left: -8px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    background-color: var(--rp-brand-lime);
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 8px color-mix(in srgb, var(--rp-brand-lime) 50%, transparent);
}

.rp-drawer .mud-nav-link.active .mud-nav-link-icon {
    color: var(--rp-brand-lime);
}


.rp-drawer .rp-nav-featured.mud-nav-link .mud-nav-link-icon,
.rp-drawer .rp-nav-featured .mud-nav-link .mud-nav-link-icon {
    color: var(--rp-brand-lime) !important;
}

/* === CommandPalette (Ctrl+K) === */
.rp-cmdk-backdrop {
    position: fixed;
    inset: 0;
    background: color-mix(in srgb, var(--rp-brand-deep) 50%, transparent);
    backdrop-filter: blur(2px);
    z-index: var(--rp-z-modal);
    animation: rp-fade-in var(--rp-motion-fast) var(--rp-easing-decelerate) both;
}

.rp-cmdk {
    position: fixed;
    top: 18vh;
    left: 50%;
    transform: translateX(-50%);
    width: min(640px, calc(100% - 32px));
    background: var(--rp-surface);
    border: 1px solid var(--rp-line);
    border-radius: var(--rp-radius-lg);
    box-shadow: var(--rp-shadow-xl);
    z-index: calc(var(--rp-z-modal) + 1);
    display: flex;
    flex-direction: column;
    max-height: 70vh;
    overflow: hidden;
    animation: rp-scale-in var(--rp-motion-base) var(--rp-easing-decelerate) both;
}

.rp-cmdk__input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--rp-line);
}

.rp-cmdk__search-icon {
    color: var(--rp-ink-muted);
    flex-shrink: 0;
}

.rp-cmdk__input {
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    font: inherit;
    font-size: 16px;
    color: var(--rp-ink);
    padding: 4px 0;
}

.rp-cmdk__input::placeholder { color: var(--rp-ink-muted); }

.rp-cmdk__esc {
    background: var(--rp-surface);
    cursor: pointer;
}

.rp-cmdk__results {
    overflow-y: auto;
    padding: 6px;
    flex: 1;
}

.rp-cmdk__group-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--rp-ink-muted);
    padding: 10px 12px 6px;
}

.rp-cmdk__row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: 0;
    border-radius: var(--rp-radius-sm);
    cursor: pointer;
    text-align: left;
    color: var(--rp-ink);
    font: inherit;
    transition: background-color var(--rp-motion-fast);
}

.rp-cmdk__row:hover,
.rp-cmdk__row--selected {
    background-color: color-mix(in srgb, var(--rp-brand-lime-soft) 50%, transparent);
}

.rp-cmdk__row--selected {
    box-shadow: inset 3px 0 0 0 var(--rp-brand-lime);
}

.rp-cmdk__row-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--rp-radius-sm);
    background: var(--rp-surface-2);
    color: var(--rp-brand-forest);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rp-cmdk__row-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.rp-cmdk__row-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--rp-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rp-cmdk__row-subtitle {
    font-size: 12px;
    color: var(--rp-ink-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rp-cmdk__row-arrow {
    color: var(--rp-ink-muted);
    opacity: 0;
    transition: opacity var(--rp-motion-fast);
}

.rp-cmdk__row--selected .rp-cmdk__row-arrow,
.rp-cmdk__row:hover .rp-cmdk__row-arrow {
    opacity: 1;
    color: var(--rp-brand-green);
}

.rp-cmdk__hint {
    padding: 12px 16px;
    color: var(--rp-ink-muted);
    font-size: 13px;
}

.rp-cmdk__footer {
    display: flex;
    gap: 16px;
    padding: 8px 16px;
    border-top: 1px solid var(--rp-line);
    background: var(--rp-surface-2);
    font-size: 11px;
    color: var(--rp-ink-muted);
}

.rp-cmdk__footer .rp-kbd { background: var(--rp-surface); }

/* === Settings con tabs verticales === */
.rp-settings {
    border: 1px solid var(--rp-line);
    overflow: hidden;
}

.rp-settings__tabs .mud-tabs-tabbar {
    background: var(--rp-surface-2);
    border-right: 1px solid var(--rp-line);
}

.rp-settings__tabs .mud-tab {
    justify-content: flex-start;
    padding: 14px 20px;
    min-height: 48px;
    text-align: left;
    text-transform: none;
    font-weight: 500;
    letter-spacing: 0;
}

.rp-settings__panel {
    background: var(--rp-surface);
}

.rp-settings__logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.rp-settings__logo-preview {
    max-width: 320px;
    max-height: 200px;
    border: 1px solid var(--rp-line);
    border-radius: var(--rp-radius-md);
    padding: 12px;
    background: var(--rp-surface);
}

.rp-settings__logo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 280px;
    height: 160px;
    border: 1px dashed var(--rp-line);
    border-radius: var(--rp-radius-md);
    color: var(--rp-ink-muted);
    background: var(--rp-surface-2);
    font-size: 13px;
}

/* === ConfirmDialog === */
.rp-confirm {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.rp-confirm__icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--rp-radius-md);
}

.rp-confirm__icon--danger  { background: var(--rp-danger-soft);  color: var(--rp-danger); }
.rp-confirm__icon--warning { background: var(--rp-warning-soft); color: var(--rp-warning); }
.rp-confirm__icon--success { background: var(--rp-success-soft); color: var(--rp-success); }
.rp-confirm__icon--info    { background: var(--rp-info-soft);    color: var(--rp-info); }
.rp-confirm__icon--neutral { background: color-mix(in srgb, var(--rp-ink-muted) 14%, transparent); color: var(--rp-ink-muted); }

.rp-confirm__icon .mud-icon-root { font-size: 28px !important; }

.rp-confirm__body {
    flex: 1;
    padding-top: 4px;
}

.rp-confirm__message {
    color: var(--rp-ink);
}

/* === Item "Crear nuevo…" dentro de un MudSelect === */
.rp-select-create {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--rp-brand-green);
    font-weight: 600;
}

.rp-select-create .mud-icon-root {
    color: var(--rp-brand-green);
}

/* === Skeleton (shimmer placeholder) === */
.rp-skel {
    display: inline-block;
    background: linear-gradient(
        90deg,
        color-mix(in srgb, var(--rp-line) 60%, var(--rp-surface-2)) 0%,
        color-mix(in srgb, var(--rp-line) 90%, var(--rp-surface-2)) 50%,
        color-mix(in srgb, var(--rp-line) 60%, var(--rp-surface-2)) 100%
    );
    background-size: 200% 100%;
    animation: rp-skel-shimmer 1.4s ease infinite;
    border-radius: var(--rp-radius-sm);
}

.rp-skel--text {
    height: 0.9em;
    width: 100%;
    border-radius: var(--rp-radius-xs);
}

.rp-skel--rect {
    width: 100%;
    height: 100px;
    border-radius: var(--rp-radius-md);
}

.rp-skel--circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

/* === Breadcrumbs === */
.rp-breadcrumbs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--rp-ink-muted);
}

.rp-breadcrumbs__crumb {
    color: var(--rp-ink-muted);
    text-decoration: none;
    padding: 2px 4px;
    border-radius: var(--rp-radius-xs);
    transition: color var(--rp-motion-fast), background-color var(--rp-motion-fast);
}

.rp-breadcrumbs__crumb:not(.rp-breadcrumbs__crumb--current):hover {
    color: var(--rp-brand-green);
    background-color: color-mix(in srgb, var(--rp-brand-lime-soft) 50%, transparent);
}

.rp-breadcrumbs__crumb--current {
    color: var(--rp-ink);
    font-weight: 600;
}

.rp-breadcrumbs__sep {
    color: var(--rp-ink-muted);
    opacity: 0.6;
}

/* === TrendBadge === */
.rp-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--rp-radius-pill);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.4;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.rp-trend__icon { font-size: 14px !important; }

.rp-trend__value {}

.rp-trend__caption {
    color: var(--rp-ink-muted);
    font-weight: 500;
}

.rp-trend--up   { background: var(--rp-success-soft); color: var(--rp-success); }
.rp-trend--down { background: var(--rp-danger-soft);  color: var(--rp-danger); }
.rp-trend--flat { background: color-mix(in srgb, var(--rp-ink-muted) 14%, transparent); color: var(--rp-ink-muted); }

/* === FilterBar === */
.rp-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--rp-surface);
    border: 1px solid var(--rp-line);
    border-radius: var(--rp-radius-md);
    margin-bottom: 16px;
    box-shadow: var(--rp-shadow-xs);
    flex-wrap: wrap;
}

.rp-filter-bar__search { flex: 1 1 280px; min-width: 220px; }
.rp-filter-bar__filters { display: flex; gap: 8px; flex-wrap: wrap; }
.rp-filter-bar__chips { display: flex; gap: 6px; flex-wrap: wrap; }
.rp-filter-bar__spacer { flex: 1 1 auto; }
.rp-filter-bar__toolbar { display: flex; gap: 4px; align-items: center; }

/* === FilterChips === */
.rp-filter-chips {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.rp-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 4px 4px 10px;
    border-radius: var(--rp-radius-pill);
    background: var(--rp-brand-lime-soft);
    color: var(--rp-brand-forest);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.rp-filter-chip__close {
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    padding: 2px;
    border-radius: 50%;
    cursor: pointer;
    line-height: 0;
    transition: background-color var(--rp-motion-fast);
}

.rp-filter-chip__close:hover {
    background-color: color-mix(in srgb, var(--rp-brand-forest) 18%, transparent);
}

/* === UserPill === */
.rp-user-pill-wrap {
    position: relative;
    display: inline-block;
}

.rp-user-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    border-radius: var(--rp-radius-pill);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    color: var(--rp-ink);
    font: inherit;
    transition: background-color var(--rp-motion-fast), border-color var(--rp-motion-fast);
}

.rp-user-pill:hover {
    background-color: color-mix(in srgb, var(--rp-brand-lime-soft) 50%, transparent);
    border-color: color-mix(in srgb, var(--rp-brand-green) 25%, var(--rp-line));
}

.rp-user-pill__avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--rp-gradient-brand);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rp-user-pill__name {
    font-size: 13px;
    font-weight: 500;
    color: var(--rp-ink);
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rp-user-pill__chev {
    color: var(--rp-ink-muted);
}

.rp-user-pill__menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 240px;
    background: var(--rp-surface);
    border: 1px solid var(--rp-line);
    border-radius: var(--rp-radius-md);
    box-shadow: var(--rp-shadow-lg);
    padding: 6px 0;
    z-index: var(--rp-z-dropdown);
    animation: rp-scale-in var(--rp-motion-fast) var(--rp-easing-decelerate) both;
    transform-origin: top right;
}

.rp-user-pill__header {
    padding: 12px 16px 10px;
}

.rp-user-pill__header-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--rp-ink);
}

.rp-user-pill__header-mail {
    font-size: 11px;
    color: var(--rp-ink-muted);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 220px;
}

.rp-user-pill__divider {
    height: 1px;
    background: var(--rp-line);
    margin: 4px 0;
}

.rp-user-pill__item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: transparent;
    border: 0;
    padding: 9px 16px;
    cursor: pointer;
    color: var(--rp-ink);
    font: inherit;
    font-size: 13px;
    text-align: left;
    text-decoration: none;
    transition: background-color var(--rp-motion-fast);
}

.rp-user-pill__item:hover {
    background-color: var(--rp-surface-2);
}

.rp-user-pill__item--danger {
    color: var(--rp-danger);
}

.rp-user-pill__item--danger:hover {
    background-color: color-mix(in srgb, var(--rp-danger-soft) 50%, transparent);
}

.rp-user-pill__item .mud-icon-root {
    color: var(--rp-ink-muted);
}

.rp-user-pill__item--danger .mud-icon-root {
    color: var(--rp-danger);
}

/* === Search trigger en AppBar (Ctrl+K) === */
.rp-search-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px 6px 12px;
    border-radius: var(--rp-radius-md);
    background: var(--rp-surface-2);
    border: 1px solid var(--rp-line);
    color: var(--rp-ink-muted);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    min-width: 280px;
    transition: background-color var(--rp-motion-fast), border-color var(--rp-motion-fast);
}

.rp-search-trigger:hover {
    border-color: color-mix(in srgb, var(--rp-brand-green) 30%, var(--rp-line));
    background-color: var(--rp-surface);
}

.rp-search-trigger__icon { color: var(--rp-ink-muted); }

.rp-search-trigger__placeholder {
    flex: 1;
    text-align: left;
}

.rp-kbd {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 6px;
    border-radius: var(--rp-radius-xs);
    background: var(--rp-surface);
    border: 1px solid var(--rp-line);
    font-family: var(--rp-font-ui);
    font-size: 11px;
    font-weight: 600;
    color: var(--rp-ink-muted);
    line-height: 1;
}

/* === Calculator badge (pulsante) === */
.rp-calculator-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px 3px 8px;
    border-radius: var(--rp-radius-pill);
    background: color-mix(in srgb, var(--rp-brand-lime-soft) 70%, transparent);
    color: var(--rp-brand-forest);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.rp-calculator-badge::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--rp-brand-lime);
    animation: rp-pulse-glow 1.8s ease-in-out infinite;
}

/* === FAB flotante (Save en calculator) === */
.rp-fab {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: var(--rp-z-sticky);
    border-radius: var(--rp-radius-pill);
    box-shadow: var(--rp-shadow-lg);
}

/* === Segmented control (period selector, etc.) === */
.rp-segmented {
    display: inline-flex;
    background: var(--rp-surface-2);
    border: 1px solid var(--rp-line);
    border-radius: var(--rp-radius-md);
    padding: 3px;
    gap: 2px;
}

.rp-segmented__item {
    padding: 6px 14px;
    border-radius: var(--rp-radius-sm);
    background: transparent;
    border: 0;
    color: var(--rp-ink-muted);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--rp-motion-fast), color var(--rp-motion-fast);
}

.rp-segmented__item:hover {
    color: var(--rp-ink);
}

.rp-segmented__item--active {
    background: var(--rp-surface);
    color: var(--rp-brand-forest);
    box-shadow: var(--rp-shadow-xs);
}

/* === Ranking card progress bar (dashboard) === */
.rp-ranking-bar {
    height: 4px;
    background: var(--rp-line);
    border-radius: var(--rp-radius-pill);
    overflow: hidden;
    margin-top: 4px;
}

.rp-ranking-bar__fill {
    height: 100%;
    background: var(--rp-gradient-brand);
    border-radius: var(--rp-radius-pill);
}

/* === Hero greeting (dashboard) === */
.rp-hero-greeting {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 24px;
}

.rp-hero-greeting__title {
    font-family: var(--rp-font-display);
    letter-spacing: 0.04em;
    font-size: 36px;
    line-height: 1;
    color: var(--rp-ink);
}

.rp-hero-greeting__sub {
    color: var(--rp-ink-muted);
    font-size: 14px;
}
