/* ==========================================================
   Presu — theming sobre Bootstrap 5 (vía CDN, sin build tools)
   ========================================================== */

:root {
    /* Paleta de marca: degradado marino → verde azulado → turquesa → menta.
       Marino y verde azulado oscuro sirven de superficie/texto (contraste alto),
       turquesa y menta son los acentos más vivos. El terracota es un color aparte,
       reservado solo para "danger" (borrar, alertas) — no pega ningún tono cálido
       en la paleta de marca, así que no se reutiliza para nada más. */
    --presu-navy: #071952;
    --presu-teal-dark: #0B666A;
    --presu-teal: #35A29F;
    --presu-mint: #97FEED;
    --presu-terracotta: #B5533C;
    --presu-terracotta-light: #D97A5F;
    --presu-slate: #4C7EA8;
    --presu-slate-light: #7FB3DE;
    --presu-on-bright: var(--presu-navy);

    --presu-font: 'Plus Jakarta Sans', var(--bs-font-sans-serif);
    --bs-body-font-family: var(--presu-font);

    --bs-primary: var(--presu-teal-dark);
    --bs-primary-rgb: 11, 102, 106;
    --bs-link-color: var(--presu-teal-dark);
    --bs-link-color-rgb: 11, 102, 106;
    --bs-link-hover-color: color-mix(in srgb, var(--presu-teal-dark) 80%, black);
    --bs-link-hover-color-rgb: 9, 82, 85;
    --bs-danger: var(--presu-terracotta);
    --bs-danger-rgb: 181, 83, 60;
    --bs-danger-bg-subtle: color-mix(in srgb, var(--presu-terracotta) 18%, white);
    --bs-body-bg: #E4F1EF;
    --bs-body-color: #1B2B33;
    --bs-border-radius: .75rem;
    --bs-border-radius-lg: 1rem;

    /* Bootstrap fija estos valores en azul por su cuenta (no los deriva de
       --bs-primary), así que hay que pisarlos aparte o se cuela el azul de
       Bootstrap en el foco de inputs y en checkboxes/radios marcados. */
    --bs-focus-ring-color: rgba(var(--bs-primary-rgb), .25);
    --bs-form-check-input-checked-bg-color: var(--presu-teal-dark);
    --bs-form-check-input-checked-border-color: var(--presu-teal-dark);
    --bs-form-check-input-focus-border: var(--presu-teal);
    --bs-form-check-input-indeterminate-bg-color: var(--presu-teal-dark);
    --bs-form-check-input-indeterminate-border-color: var(--presu-teal-dark);

    --presu-shell-bg: #F7FCFB;
    --presu-border: #D7E8E5;
    --presu-text-muted: #74908F;
    --presu-shadow: 0 1px 3px rgba(7, 25, 82, .08);
    --presu-shadow-lg: 0 12px 24px rgba(7, 25, 82, .14);
    --presu-heading: var(--presu-navy);
    --presu-surface: linear-gradient(135deg, var(--presu-teal-dark), var(--presu-navy));
    --presu-nav-active-bg: color-mix(in srgb, var(--presu-teal) 15%, white);
    --presu-nav-active-color: var(--presu-teal-dark);
    --presu-income: var(--presu-teal-dark);
    --presu-expense: var(--presu-terracotta);
    --presu-transfer: var(--presu-slate);
}

/* ---------- Modo oscuro ---------- */

:root[data-theme="dark"] {
    --presu-on-bright: var(--presu-navy);
    --bs-primary: var(--presu-teal);
    --bs-primary-rgb: 53, 162, 159;
    --bs-link-color: var(--presu-teal);
    --bs-link-color-rgb: 53, 162, 159;
    --bs-link-hover-color: color-mix(in srgb, var(--presu-teal) 80%, white);
    --bs-link-hover-color-rgb: 93, 181, 178;
    --bs-danger: var(--presu-terracotta-light);
    --bs-danger-rgb: 217, 122, 95;
    --bs-danger-bg-subtle: color-mix(in srgb, var(--presu-terracotta) 25%, #071952);
    --bs-body-bg: color-mix(in srgb, #051445 55%, black);
    --bs-body-color: #DFF7F3;
    --bs-secondary-color: #B8DDE0;
    /* .text-dark (usado en los iconos de "cancelar"/"atrás") no está atado al
       body-color por defecto de Bootstrap: sin esto se queda gris casi negro. */
    --bs-dark: #DFF7F3;
    --bs-dark-rgb: 223, 247, 243;

    --bs-form-check-input-checked-bg-color: var(--presu-teal);
    --bs-form-check-input-checked-border-color: var(--presu-teal);
    --bs-form-check-input-focus-border: var(--presu-teal);
    --bs-form-check-input-indeterminate-bg-color: var(--presu-teal);
    --bs-form-check-input-indeterminate-border-color: var(--presu-teal);

    --presu-shell-bg: color-mix(in srgb, var(--presu-navy) 80%, black);
    --presu-border: color-mix(in srgb, var(--presu-shell-bg) 75%, white);
    --presu-text-muted: #B8DDE0;
    --presu-shadow: 0 1px 3px rgba(0, 0, 0, .35);
    --presu-shadow-lg: 0 12px 28px rgba(0, 0, 0, .5);
    --presu-heading: var(--presu-mint);
    --presu-surface: linear-gradient(135deg, var(--presu-teal), var(--presu-teal-dark));
    --presu-nav-active-bg: color-mix(in srgb, var(--presu-teal) 18%, transparent);
    --presu-nav-active-color: var(--presu-teal);
    --presu-income: var(--presu-mint);
    --presu-expense: var(--presu-terracotta-light);
    --presu-transfer: var(--presu-slate-light);
}

:root[data-theme="dark"] .text-secondary { color: var(--presu-text-muted) !important; }
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .form-control,
:root[data-theme="dark"] .form-select {
    background-color: var(--presu-shell-bg);
    color: var(--bs-body-color);
    border-color: var(--presu-border);
}
:root[data-theme="dark"] .bg-mint-soft { background-color: color-mix(in srgb, var(--presu-teal) 18%, transparent) !important; }
:root[data-theme="dark"] .bg-sand { background-color: color-mix(in srgb, var(--presu-mint) 15%, transparent) !important; }

.btn-primary {
    --bs-btn-bg: var(--presu-teal-dark);
    --bs-btn-border-color: var(--presu-teal-dark);
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: var(--presu-teal);
    --bs-btn-hover-border-color: var(--presu-teal);
    --bs-btn-hover-color: var(--presu-on-bright);
    --bs-btn-active-bg: var(--presu-teal);
    --bs-btn-active-border-color: var(--presu-teal);
    --bs-btn-active-color: var(--presu-on-bright);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--presu-teal-dark);
    --bs-btn-disabled-border-color: var(--presu-teal-dark);
    --bs-btn-focus-shadow-rgb: 11, 102, 106;
}

/* En oscuro el primario es el turquesa (más claro): necesita texto oscuro para leerse */
:root[data-theme="dark"] .btn-primary {
    --bs-btn-bg: var(--presu-teal);
    --bs-btn-border-color: var(--presu-teal);
    --bs-btn-color: var(--presu-on-bright);
    --bs-btn-hover-bg: var(--presu-teal-dark);
    --bs-btn-hover-border-color: var(--presu-teal-dark);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--presu-teal-dark);
    --bs-btn-active-border-color: var(--presu-teal-dark);
    --bs-btn-active-color: #fff;
    --bs-btn-disabled-color: var(--presu-on-bright);
    --bs-btn-disabled-bg: var(--presu-teal);
    --bs-btn-disabled-border-color: var(--presu-teal);
    --bs-btn-focus-shadow-rgb: 53, 162, 159;
}

/* El acordeón (FAQ de Ayuda) redeclara sus variables de azul dentro de la
   propia clase .accordion, así que sobreescribirlas en :root no basta: hay
   que pisarlas aquí, en el mismo selector que las fija Bootstrap. */
.accordion {
    --bs-accordion-active-color: var(--presu-teal-dark);
    --bs-accordion-active-bg: color-mix(in srgb, var(--presu-teal) 14%, white);
    --bs-accordion-btn-focus-box-shadow: 0 0 0 .25rem rgba(var(--bs-primary-rgb), .25);
    --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%230B666A' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M2 5L8 11L14 5'/%3e%3c/svg%3e");
}

:root[data-theme="dark"] .accordion {
    --bs-accordion-active-color: var(--presu-teal);
    --bs-accordion-active-bg: color-mix(in srgb, var(--presu-teal) 18%, transparent);
    --bs-accordion-btn-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23DFF7F3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M2 5L8 11L14 5'/%3e%3c/svg%3e");
    --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2335A29F' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M2 5L8 11L14 5'/%3e%3c/svg%3e");
}

.progress { background-color: color-mix(in srgb, var(--presu-border) 70%, transparent); }
.progress-bar {
    background-color: var(--presu-teal);
    transition: width .5s ease;
}
.progress-bar.bg-danger-fill { background-color: var(--presu-terracotta) !important; }
.progress-bar.bg-mint-fill { background-color: var(--presu-teal) !important; }

/* ---------- Colores de la paleta como utilidades ---------- */
.bg-sage { background: var(--presu-surface) !important; }
.bg-sage-dark { background-color: var(--presu-navy) !important; }
.bg-mint { background-color: var(--presu-mint) !important; }
.bg-mint-soft { background-color: color-mix(in srgb, var(--presu-teal) 16%, transparent) !important; }
.bg-sand { background-color: color-mix(in srgb, var(--presu-mint) 30%, white) !important; }
.bg-cream { background-color: var(--presu-shell-bg) !important; }
.text-sage { color: var(--presu-teal-dark) !important; }
.text-sage-dark { color: var(--presu-heading) !important; }
.text-income { color: var(--presu-income) !important; }
.text-expense { color: var(--presu-expense) !important; }
.text-transfer { color: var(--presu-transfer) !important; }

/* Bootstrap no trae esta utilidad (solo existe en Tailwind): hace falta para
   que un hijo flex con .text-truncate pueda encogerse por debajo del ancho
   de su contenido en vez de desbordar el contenedor. */
.min-w-0 { min-width: 0; }

/* ---------- Tipografía ---------- */

.balance-figure {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -.02em;
}

.section-label {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 700;
    color: var(--presu-text-muted) !important;
}

.link-view-all {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    padding: .25rem .65rem;
    border-radius: 999px;
    background-color: var(--presu-nav-active-bg);
    color: var(--presu-nav-active-color) !important;
    font-size: .75rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .15s ease;
}

.link-view-all:hover { background-color: color-mix(in srgb, var(--presu-teal) 25%, transparent); }

.link-view-all i { font-size: .65rem; }

h1, h2, .h1, .h2 { font-weight: 700; }

/* ---------- Carcasa de app móvil ---------- */

body { background: var(--bs-body-bg); color: var(--bs-body-color); }

.app-shell, .guest-shell {
    width: 100%;
    min-height: 100vh;
    background: var(--bs-body-bg);
}

.app-shell { display: flex; flex-direction: column; }

.guest-shell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 1.5rem;
}

.app-main { flex: 1; overflow-y: auto; padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px)); }

/* ---------- Escritorio: sidebar en vez de bottom-nav ---------- */

@media (min-width: 768px) {
    .app-shell {
        display: flex;
        flex-direction: row;
        align-items: stretch;
    }

    .app-main { padding-bottom: 2rem; }

    .bottom-nav { display: none; }

    .sidebar {
        display: flex !important;
        position: sticky;
        top: 0;
        height: 100vh;
    }

    .app-content { flex: 1; min-width: 0; }

    .app-main { max-width: 760px; margin: 0 auto; width: 100%; }
}

.sidebar {
    display: none;
    flex-direction: column;
    width: 230px;
    flex-shrink: 0;
    background: var(--presu-shell-bg);
    border-right: 1px solid var(--presu-border);
    padding: 1.5rem 1rem;
}

.sidebar-logo {
    margin: -1.5rem -1rem 2rem;
}

.sidebar-logo img {
    display: block;
    width: 100%;
    height: auto;
}

.sidebar-logo .logo-dark { display: none; }

:root[data-theme="dark"] .sidebar-logo .logo-light { display: none; }
:root[data-theme="dark"] .sidebar-logo .logo-dark { display: block; }

.auth-logo img { display: inline-block; }
.auth-logo .logo-dark { display: none; }

:root[data-theme="dark"] .auth-logo .logo-light { display: none; }
:root[data-theme="dark"] .auth-logo .logo-dark { display: inline-block; }


.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    color: var(--presu-text-muted);
    padding: .6rem .75rem;
    border-radius: .6rem;
    font-size: .9rem;
    margin-bottom: .25rem;
    transition: background-color .15s ease, color .15s ease;
}

.sidebar .nav-link:hover { background: var(--presu-nav-active-bg); color: var(--presu-nav-active-color); }

.sidebar .nav-link.active {
    background: var(--presu-nav-active-bg);
    color: var(--presu-nav-active-color);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--presu-nav-active-color);
}

.sidebar .nav-link i { font-size: 1.1rem; width: 1.4rem; text-align: center; }

.sidebar-footer { margin-top: auto; }

.icon-btn-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--presu-shell-bg);
    color: var(--presu-text-muted);
    box-shadow: var(--presu-shadow);
    font-size: 1.15rem;
    transition: background-color .15s ease, color .15s ease;
}

.icon-btn-circle:hover { background: var(--presu-nav-active-bg); color: var(--presu-nav-active-color); }

.desktop-icon-btn { display: none; }

@media (min-width: 768px) {
    .desktop-icon-btn { display: block; }

    .desktop-icon-btn .btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 2.5rem;
        height: 2.5rem;
        border-radius: 50%;
        background: var(--presu-shell-bg);
        color: var(--presu-text-muted);
        box-shadow: var(--presu-shadow);
        font-size: 1.15rem;
        transition: background-color .15s ease, color .15s ease;
    }

    .desktop-icon-btn .btn:hover { background: var(--presu-nav-active-bg); color: var(--presu-nav-active-color); }

    .desktop-icon-btn.logout .btn:hover { color: var(--bs-danger); }
}

/* ---------- Desplegables (menú de cuenta) ---------- */

.dropdown-menu {
    --bs-dropdown-link-hover-bg: var(--presu-nav-active-bg);
    --bs-dropdown-link-hover-color: var(--presu-nav-active-color);
    --bs-dropdown-link-active-bg: var(--presu-nav-active-bg);
    --bs-dropdown-link-active-color: var(--presu-nav-active-color);
    --bs-dropdown-item-border-radius: .5rem;
    --bs-dropdown-item-padding-y: .45rem;
    --bs-dropdown-item-padding-x: .75rem;
    --bs-dropdown-font-size: .85rem;
    border-color: var(--presu-border);
    box-shadow: var(--presu-shadow-lg);
    padding: .4rem;
}

.dropdown-item { color: var(--presu-text-muted); }

.dropdown-item:hover,
.dropdown-item:focus { color: var(--presu-nav-active-color); }

/* ---------- Enlace de ayuda (distinto del resto del menú, pero discreto:
   mismo tratamiento que ya usa el item de navegación activo) ---------- */

.help-callout {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .6rem .75rem;
    border-radius: .6rem;
    margin-bottom: 1rem;
    color: var(--presu-nav-active-color);
    font-size: .70rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .15s ease;
}

.help-callout:hover {
    color: var(--presu-nav-active-color);
    background: color-mix(in srgb, var(--presu-teal) 22%, transparent);
}

.help-callout i { font-size: 1.1rem; }

/* ---------- Navegación inferior ---------- */

.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    background: color-mix(in srgb, var(--presu-shell-bg) 90%, transparent);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--presu-border);
    padding: .4rem 0 calc(.4rem + env(safe-area-inset-bottom, 0px));
}

.bottom-nav .nav-link {
    color: var(--presu-text-muted);
    font-size: .7rem;
    text-align: center;
    padding: .25rem 0;
    transition: color .15s ease;
}

.bottom-nav .nav-link.active { color: var(--presu-nav-active-color); }

.bottom-nav .tab-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto .2rem;
    font-size: 1.1rem;
    transition: background-color .15s ease;
}

.bottom-nav .nav-link.active .tab-icon { background: var(--presu-nav-active-bg); }

/* ---------- Formulario de alta/edición ----------
   Sustituye a la lista dentro de la misma página (sin modal ni overlay
   a pantalla completa): la cabecera y la navegación siguen visibles. */

.page-relative { position: relative; }

.overlay-screen {
    display: flex;
    flex-direction: column;
    animation: presu-fade-in .15s ease;
}

@keyframes presu-fade-in {
    from { opacity: 0; transform: translateY(.5rem); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Varios ---------- */

.dot { width: .625rem; height: .625rem; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot-lg { width: .85rem; height: .85rem; }

.icon-circle {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.account-chip { min-width: 140px; flex-shrink: 0; }

.more-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .75rem;
}

.more-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: 1rem .5rem;
    text-decoration: none;
}

.more-grid-item .icon-circle { width: 2.75rem; height: 2.75rem; font-size: 1.1rem; }

.more-grid-item .label {
    font-size: .7rem;
    font-weight: 600;
    color: var(--bs-body-color);
    line-height: 1.2;
    text-align: center;
}

.list-group-item {
    border: none !important;
    border-bottom: 1px solid var(--presu-border) !important;
    background: transparent !important;
    transition: background-color .15s ease;
}

.list-group-item:last-child { border-bottom: none !important; }

/* Los desplegables flotantes (sugerencias de etiquetas/categorías) necesitan
   fondo opaco: si no, se transparenta sobre lo que haya debajo en la página. */
.position-absolute.list-group {
    background-color: var(--bs-body-bg);
    border-radius: var(--bs-border-radius);
    overflow: hidden;
}

.position-absolute.list-group .list-group-item {
    background-color: var(--bs-body-bg) !important;
}

.card {
    border: none;
    box-shadow: var(--presu-shadow);
    transition: transform .15s ease, box-shadow .15s ease;
}

.type-accent {
    position: relative;
}

.type-accent::before {
    content: "";
    position: absolute;
    left: 0;
    top: .6rem;
    bottom: .6rem;
    width: 3px;
    border-radius: 999px;
    background-color: var(--type-accent-color, transparent);
}

@media (hover: hover) {
    .card:hover {
        transform: translateY(-2px);
        box-shadow: var(--presu-shadow-lg);
    }

    .list-group-item:hover { background: color-mix(in srgb, var(--presu-teal) 6%, transparent) !important; }
}

.scrollbar-none {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.scrollbar-none::-webkit-scrollbar {
    display: none;
}

/* ---------- Accesibilidad / interacción ---------- */

.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
a.nav-link:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* Sin :focus-visible (clic de ratón, tap táctil) el navegador pone su propio
   anillo/resaltado azul por defecto: lo quitamos para que solo se vea nuestro
   color de hover/active de arriba. */
.btn {
    -webkit-tap-highlight-color: transparent;
}
.btn:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}

.btn-link.p-0:active,
.btn.rounded-circle:active {
    transform: scale(.92);
}

.btn-link.p-0,
.btn.rounded-circle {
    transition: transform .1s ease;
}

/* ---------- Selector segmentado (Gasto/Ingreso/Transferencia) ---------- */

.search-box {
    display: flex;
    align-items: center;
    gap: .6rem;
    background: color-mix(in srgb, var(--presu-shell-bg) 70%, transparent);
    backdrop-filter: blur(8px);
    border: 1px solid var(--presu-border);
    border-radius: 999px;
    padding: .1rem 1rem;
}

.search-box:focus-within {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

.search-box i { color: var(--presu-text-muted); }

.search-box .form-control {
    border: none;
    background: transparent;
    padding: .55rem 0;
}

.search-box .form-control:focus { box-shadow: none; background: transparent; }

.search-box .form-control:focus-visible { outline: none; }

.tag-filter-chip {
    border: 1px solid var(--presu-border);
    background: transparent;
    color: var(--bs-body-color);
}

.tag-filter-chip:hover { background: var(--presu-nav-active-bg); color: var(--presu-nav-active-color); border-color: var(--presu-nav-active-color); }

.segmented-control {
    display: flex;
    background: var(--presu-nav-active-bg);
    border-radius: 999px;
    padding: .25rem;
    gap: .25rem;
}

.segmented-control .btn {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: none !important;
    border-radius: 999px !important;
    background: transparent;
    color: var(--bs-body-color);
    transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.segmented-control .btn.active-segment {
    background: var(--bs-primary);
    color: #fff;
    box-shadow: var(--presu-shadow);
}

:root[data-theme="dark"] .segmented-control .btn.active-segment { color: var(--presu-on-bright); }

/* ---------- Estado vacío ---------- */

.empty-state {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: var(--presu-text-muted);
}

.empty-state .icon-circle {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto .75rem;
    background: color-mix(in srgb, var(--presu-teal) 14%, transparent);
    color: var(--presu-teal-dark);
    font-size: 1.5rem;
}

:root[data-theme="dark"] .empty-state .icon-circle { color: var(--presu-teal); }

/* ---------- Selector de color por muestras ---------- */

.color-swatch {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    border: 2px solid transparent;
    padding: 0;
    cursor: pointer;
    transition: transform .1s ease;
}

.color-swatch:hover { transform: scale(1.08); }

.color-swatch.active {
    border-color: var(--presu-navy);
}

:root[data-theme="dark"] .color-swatch.active { border-color: var(--presu-mint); }

/* ---------- Avatar ---------- */

.avatar-circle {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--presu-border) 70%, transparent);
}

/* ---------- Cabecera de grupo de fecha ---------- */

.date-group-header {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 700;
    color: var(--presu-text-muted);
    margin: .75rem 0 .35rem .25rem;
}

[x-cloak] { display: none !important; }

/* ---------- Toast de confirmación ---------- */

.presu-toast {
    position: fixed;
    left: 50%;
    bottom: 5.5rem;
    transform: translateX(-50%);
    background: var(--presu-navy);
    color: #fff;
    padding: .6rem 1.1rem;
    border-radius: .6rem;
    font-size: .85rem;
    box-shadow: var(--presu-shadow-lg);
    backdrop-filter: blur(6px);
    z-index: 1080;
}

@media (min-width: 768px) {
    .presu-toast { bottom: 2rem; }
}

/* ---------- Toggle de tema ---------- */

.theme-toggle .bi-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .bi-moon-stars { display: none; }
:root[data-theme="dark"] .theme-toggle .bi-sun { display: inline-block; }

.theme-toggle .label-light { display: none; }
:root[data-theme="dark"] .theme-toggle .label-dark { display: none; }
:root[data-theme="dark"] .theme-toggle .label-light { display: inline; }

/* ---------- Navegación "atrás" (solo pantallas secundarias en móvil) ---------- */

@media (min-width: 768px) {
    .back-to-more { display: none; }
}
