/* --- FUENTES --- */
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 400; src: url('./fonts/roboto-regular.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 500; src: url('./fonts/roboto-medium.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 700; src: url('./fonts/roboto-bold.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Roboto Mono'; font-style: normal; font-weight: 400 500; src: url('./fonts/roboto-mono.woff2') format('woff2'); font-display: swap; }

@font-face {
    font-family: 'Material Symbols Rounded';
    font-style: normal;
    font-weight: 100 700; 
    src: url('./fonts/icons.woff2') format('woff2');
    font-display: block;
}

/* IMPORTANTE: Quitamos !important del selector universal para no romper los iconos */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

/* Forzamos la fuente de iconos solo en sus clases */
.material-symbols-outlined, .material-symbols-rounded {
  font-family: 'Material Symbols Rounded' !important; /* Forzamos aquí */
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

:root {
    /* MODO NOCHE */
    --md-sys-color-background: #121212;
    --md-sys-color-surface: #1e1f20;
    --md-sys-color-surface-variant: #333537;
    --md-sys-color-primary: #9cd67e;
    --md-sys-color-on-primary: #0b3d00; /* Texto Oscuro para el verde pistacho */
    --md-sys-color-on-surface: #ffffff;
    --md-sys-color-outline: #8e918f;
    --menu-bg-hover: rgba(255, 255, 255, 0.05); 
    --menu-item-bg-active: #ffffff;
    --menu-item-text-active: #000000;
    --md-sys-color-magic: #1a73e8; /* Azul para el botón Renovar */
    --md-sys-color-on-magic: #ffffff;
}

body.light-mode {
    /* MODO DÍA */
    --md-sys-color-background: #f5f5f5;
    --md-sys-color-surface: #ffffff;
    --md-sys-color-surface-variant: #e0e0e0;
    --md-sys-color-primary: #388e3c;
    --md-sys-color-on-primary: #ffffff; /* Texto Blanco para el verde saturado */
    --md-sys-color-on-surface: #1c1b1f;
    --menu-bg-hover: #9cd67e; /* Verde solicitado para Hover en Modo Día */
    --menu-item-bg-active: var(--md-sys-color-primary);
    --menu-item-text-active: #ffffff;
}

body {
    background-color: var(--md-sys-color-background);
    color: var(--md-sys-color-on-surface);
    font-family: 'Roboto', sans-serif; /* Fuente base aquí */
    user-select: none;
}

.container { width: 100%; max-width: 940px; margin: 0 auto; padding: 0 16px; }

header {
    background-color: var(--md-sys-color-surface);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0px 2px 12px rgba(0, 0, 0, 0.65);
}

header .container { display: flex; align-items: center; justify-content: space-between; }

.header-actions {
    display: flex;
    gap: 12px; 
    align-items: center;
    
    /* SOLUCIÓN AL SALTO: Reservar altura y ancho mínimo */
    min-height: 40px; 
    min-width: 40px; /* Opcional, para reservar espacio horizontal también */
}

/* Botón de Instalar en el Header (Estilo Píldora) */
.btn-header-install {
    background-color: rgba(120, 194, 67, 0.15); /* Verde translúcido */
    color: var(--md-sys-color-primary);
    border: 1px solid rgba(120, 194, 67, 0.4);
    border-radius: 20px; /* Bordes bien redondos */
    height: 40px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* Espacio entre icono y texto */
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.btn-header-install:hover {
    background-color: rgba(120, 194, 67, 0.25);
}

.btn-close-dialog {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--md-sys-color-on-surface);
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    transition: background 0.3s ease;
}
.btn-close-dialog:hover { background-color: var(--md-sys-color-hover); }

/* --- ESTILO GLOBITO (TOOLTIP DINÁMICO) v56 --- */
.dynamic-tooltip {
    position: absolute;
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    z-index: 5000;
    margin-bottom: 12px;
    animation: tooltip-pop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.dynamic-tooltip::after {
    content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
    border-width: 6px; border-style: solid;
    border-color: var(--md-sys-color-primary) transparent transparent transparent;
}

@keyframes tooltip-pop {
    from { opacity: 0; transform: translateY(10px) scale(0.8); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.dynamic-tooltip.error-tooltip { background-color: #ff5252; color: #ffffff; }
.dynamic-tooltip.error-tooltip::after { border-color: #ff5252 transparent transparent transparent; }
@keyframes tooltip-pop { from { opacity: 0; transform: translateY(10px) scale(0.8); } to { opacity: 1; transform: translateY(0) scale(1); } }

.error-tooltip { animation: tooltip-shake 0.3s ease-in-out; }
@keyframes tooltip-shake {
    0%, 100% { transform: translateY(0) scale(1); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.brand { display: flex; align-items: center; }
.brand h1 { font-size: 20px; font-weight: 500; margin: 0; }
.brand .icon-logo {
    font-size: 28px; margin-right: 8px;
    background: linear-gradient(40deg, #6b9c48 30%, #b8e994 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    font-variation-settings: 'FILL' 1, 'wght' 400;
}

/* VERSION TAG */
.brand .version-tag {
    margin-left: 8px; 
    margin-top: 0; /* Sin margen top */
    font-size: 0.7rem;
    font-family: 'Roboto Mono', monospace;
    color: var(--md-sys-color-on-surface-variant);
    
    /* Alineación */
    align-self: center; /* Centrado vertical */
    
    background: rgba(255,255,255,0.05);
    padding: 2px 6px; 
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.05);
}

hr { 
    border: 0; 
    border-top: 1px solid var(--md-sys-color-surface-variant); 
    margin: 4px 0; 
}

/* --- ICONO NAV MENU HOVER --- */
.icon-btn, .btn-close-dialog {
    width: 40px;
    height: 40px;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--md-sys-color-on-surface);
    cursor: pointer;
    transition: background 0.3s ease;
}

.icon-btn:hover, .btn-close-dialog:hover {
    background-color: var(--md-sys-color-hover) !important;
}

/* --- BOTONES PWA --- */
.btn-install {
    margin: 0 0 16px 0;
    padding: 12px 16px;
    background-color: rgba(120, 194, 67, 0.15);
    color: var(--md-sys-color-primary);
    border: 1px solid rgba(120, 194, 67, 0.3);
    border-radius: 16px;
    font-family: var(--md-ref-typeface);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex; 
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
    width: 100%;
}
.btn-install:active { background-color: rgba(120, 194, 67, 0.3); transform: scale(0.98); }

.ios-prompt {
    margin: 0 0 20px 0;
    padding: 16px;
    background-color: #252525;
    border-left: 4px solid var(--md-sys-color-primary);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--md-sys-color-on-surface);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    animation: fadeIn 0.5s ease;
}
.ios-prompt p { margin: 0 0 12px 0; line-height: 1.5; }
.ios-prompt strong { color: white; }
.ios-prompt button { background: none; border: none; color: var(--md-sys-color-primary); font-weight: 700; font-size: 0.8rem; cursor: pointer; text-transform: uppercase; float: right; padding: 4px 8px; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

.ios-menu-prompt { padding: 12px 16px; font-size: 0.8rem; line-height: 1.4; color: #ccc; }


/* --- DIALOGOS CENTRADOS --- */
dialog {
    background: var(--md-sys-color-surface);
    color: white;
    border: 1px solid var(--md-sys-color-surface-variant);
    border-radius: 28px;
    padding: 32px 24px 24px 24px;    
    /* CENTRADO ABSOLUTO */
    position: fixed;
    inset: 0;
    margin: auto;    
    max-width: 90%;
    width: 320px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}
dialog::backdrop { background: rgba(0,0,0,0.7); backdrop-filter: blur(2px); }

/* --- RESTO DE ESTILOS --- */
main { padding: 16px; max-width: 1200px; margin: 0 auto; }

.section-title {
    color: var(--md-sys-color-primary);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 32px 0 16px 0;
    display: flex;
    align-items: center;
    justify-content: center; /* CENTRADO v39 */
    text-align: center;
}
.section-title::before, .section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--md-sys-color-surface-variant);
}
/* Sección sin enlaces: el título no llama la atención (su .grid hermano está vacío) */
.section-title:has(+ .grid:empty) { color: var(--md-sys-color-surface-variant); }
.section-title::before { margin-right: 16px; }
.section-title::after { margin-left: 16px; }

.grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); 
    gap: 12px; 
}

/* Tarjetas (Items) */
.card {
    background-color: var(--md-sys-color-surface);
    border-radius: 16px;
    display: flex; 
    flex-direction: column; 
    text-align: center;
    border: 1px solid var(--md-sys-color-surface-variant);
    position: relative; 
    cursor: pointer;
    /* overflow: hidden;  <-- ELIMINADO PARA QUE NO RECORTE EL BOTÓN */
}

/* Asegurar que el contenido interno no se salga pero el botón sí */
.card-link-wrapper {
    border-radius: 16px; /* Coincidir con la card */
    overflow: hidden;    /* El recorte se queda aquí adentro */
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 16px; width: 100%; height: 100%; text-decoration: none !important;
    color: var(--md-sys-color-on-surface) !important;
}


/* Evitar colores de visitado o link estándar */
.card-link-wrapper:link, 
.card-link-wrapper:visited, 
.card-link-wrapper:hover, 
.card-link-wrapper:active {
    color: var(--md-sys-color-on-surface) !important;
}

/* Efecto Hover (Opcional, para que resalte un poquito al pasar el mouse) */
.card:hover { border-color: var(--md-sys-color-outline); }
.card:active { transform: scale(0.97); background-color: var(--md-sys-color-surface-variant); }

/* Modo Edición (Se mantiene igual, sobrescribe el borde gris con verde punteado) */
.card.editing {
    border-color: var(--md-sys-color-primary);
    border-style: dashed;
    position: relative; /* Necesario para que el btn-delete se posicione bien */
}
.card-icon { color: var(--md-sys-color-primary); margin-bottom: 8px; font-size: 28px; }

.card-text { font-size: 13px; font-weight: 500; line-height: 1.2; }
.card-img { width: 28px; height: 28px; margin-bottom: 8px; border-radius: 4px; }

.btn-ai-style { background-color: #323232; color: #e3e3e3; border: 1px solid #444746; border-radius: 24px; height: 40px; padding: 0 16px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background-color 0.2s; font-family: inherit; }

.btn-ai-style:hover { background-color: #424242; color: white; }
.btn-ai-style.active { background-color: #a8c7fa; color: #003355; border-color: transparent; }
.btn-ai-style.hidden { display: none !important; }
.btn-delete {
    position: absolute;
    top: -8px; /* Un poco más afuera para que se vea pro */
    right: -8px;
    background-color: #d32f2f;
    color: white;
    border: 2px solid var(--md-sys-color-background);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 50; 
    box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.btn-delete:hover { transform: scale(1.1); }
.btn-save-header {
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary); 
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    transition: transform 0.2s;
}
.btn-save-header:active { transform: scale(0.9); }
body.light-mode .btn-save-header {
    color: #ffffff; 
}
.card.add-new { background-color: transparent; border: 2px dashed var(--md-sys-color-outline); justify-content: center; opacity: 0.6; }
.card.add-new:hover { opacity: 1; border-color: var(--md-sys-color-primary); background-color: rgba(168, 199, 250, 0.05); }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.loading-icon { font-size: 18px !important; margin-left: 10px; animation: spin 1s linear infinite; vertical-align: middle; display: inline-block; }
.carousel-container { display: flex; align-items: center; background-color: var(--md-sys-color-background); border: 1px solid var(--md-sys-color-surface-variant); border-radius: 8px; padding: 4px; margin-bottom: 12px; }
.nav-btn { background: none; border: none; color: var(--md-sys-color-primary); font-size: 20px; cursor: pointer; padding: 0 8px; user-select: none; }
.nav-btn:hover { color: white; }
.icon-window { flex: 1; overflow: hidden; position: relative; height: 40px; }
.icon-strip { display: flex; gap: 8px; position: absolute; left: 0; transition: left 0.3s ease-out; height: 100%; align-items: center; }
.icon-option { font-size: 28px; color: #8e918f; cursor: pointer; padding: 4px; border-radius: 4px; transition: 0.2s; }
.icon-option:hover {
color: var(--md-sys-color-primary);
background-color: rgba(168, 199, 250, 0.1);
}

.icon-option.selected { 
    color: var(--md-sys-color-primary); 
    background-color: rgba(156, 214, 126, 0.2); /* Resalte verde suave */
    border-radius: 8px;
    transform: scale(1.2);
}


.input-group { margin-bottom: 16px; display: flex; flex-direction: column; padding: 0 4px; }
.input-group label { font-size: 11px; color: var(--md-sys-color-primary); margin-bottom: 4px; }

.input-md {
    width: 100%;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 16px;
    transition: all 0.2s ease;
    
    /* Fondo Noche */
    background-color: #252525; 
    color: #ffffff;
}

body.light-mode .input-md {
    /* Fondo Día */
    background-color: #e0e0e0; 
    color: #000000;
}

/* Focus con color verde según tema */
.input-md:focus {
    outline: none;
    border-color: var(--md-sys-color-primary);
    background-color: var(--md-sys-color-surface);
}

.btn-row {
    display: flex;
    justify-content: center; /* CENTRADO v54 */
    align-items: center;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 500;
    cursor: pointer;
border: none; 
background: transparent; 
color: var(--md-sys-color-primary); }

/* Botones de Acción (Guardar/Confirmar) */
.btn-filled {
background: var(--md-sys-color-primary);
color: var(--md-sys-color-on-primary);
border: none;
padding: 10px 20px;
border-radius: 20px;
font-weight: 600;
cursor: pointer;
display: flex;
align-items: center;
gap: 8px; 
}
.btn-filled:hover {
    filter: brightness(1.1); /* Brillar un poco al pasar el mouse */
}

.btn-filled, .btn-renew-magic {
    height: 44px;
    padding: 0 24px;
    border-radius: 22px;
    font-size: 0.95rem;
    font-weight: 700 !important; /* AMBOS BOLD */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
}

.btn-renew-magic {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #1a73e8; /* Azul */
    color: #ffffff;
    border: none;
    border-radius: 20px;
    font-size: 0.95rem; /* Mismo que el de confirmar */
    font-weight: 500; /* No BOLD solicitado */
    cursor: pointer;
    transition: all 0.2s;
}

.btn-renew-magic:hover { filter: brightness(1.1); }
.btn-renew-magic:active { transform: scale(0.95); }

/* Contenedor para input con botón de acción */
.input-with-action { position: relative; }
.input-with-action .input-md {
    width: 100%;
    padding-right: 44px; /* Espacio para el icono a la derecha */
}

.btn-clear-input { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: none; color: #888; cursor: pointer; }

.btn-clear-input:hover {
    background-color: rgba(255,255,255,0.1);
    color: var(--md-sys-color-primary);
}

.btn-clear-input .material-symbols-outlined {
    font-size: 20px;
}

/* POPOVER MENU & ANCHORING */
#btn-nav-menu { anchor-name: --menu-anchor; }

#nav-menu {
    position-anchor: --menu-anchor;
    position-area: bottom center;
    position-try-fallbacks: --bottom-span-left;
    margin-top: 8px;
    min-width: 220px;
    background: var(--md-sys-color-surface);
    /* Borde más notorio en Modo Noche */
    border: 1px solid #b1b6bb; 
    border-radius: 12px;
    padding: 8px 0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    color: var(--md-sys-color-on-surface);
}
body.light-mode #nav-menu { border: 1px solid rgba(0,0,0,0.1); }
/* Separadores HR en menú PopOver */
#nav-menu hr {
    border: 0;
    border-top: 1px solid var(--md-sys-color-surface-variant);
    margin: 8px 0;
}

#nav-menu:popover-open { display: block; animation: fadeSlide 0.2s ease; }

@keyframes fadeSlide {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* REGLAS DE POSICIÓN BASADAS EN SPAN */
@position-try --left-span-top { position-area: left span-top; }
@position-try --bottom-span-left { position-area: bottom span-left; }
@position-try --bottom-span-right { position-area: bottom span-right; }
@position-try --top-span-left { position-area: top span-left; }
@position-try --top-span-right { position-area: top span-right; }

.menu-list { display: flex; flex-direction: column; }
.menu-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
}
.menu-label { font-size: 0.75rem; 
color: var(--md-sys-color-primary) !important; 
    font-weight: 700;
    }

.version-badge {
    background: var(--md-sys-color-surface-variant);
    color: var(--md-sys-color-on-surface);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-family: 'Roboto Mono', monospace !important;
}

dialog { cursor: default; }  /* títulos y etiquetas: flecha, no cursor de texto */
dialog input { cursor: text; }
dialog h3 { 
    text-align: center; /* CENTRADO v38 */
    cursor: default;
    margin-top: 0; 
    margin-bottom: 24px;
    color: var(--md-sys-color-on-surface);
}

.menu-section-label { 
    padding: 12px 16px 6px 16px; 
    font-size: 0.75rem; 
    font-weight: 700;
    color: var(--md-sys-color-primary);
    text-align: left;
}
.menu-action-btn {
    background: transparent; border: none; color: white;
    padding: 12px 16px; display: flex; align-items: center; gap: 12px;
    cursor: pointer; width: 100%; text-align: left; font-family: inherit; font-size: 0.9rem;
}
.menu-action-btn:hover { background: rgba(255,255,255,0.05); }
.menu-action-btn.primary-action { color: var(--md-sys-color-primary); font-weight: 500; }

/* --- ESTILOS MENU APARIENCIA --- */
.menu-item.theme-option, .menu-action-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    width: 100%;
    border: none;
    background: transparent;
    color: var(--md-sys-color-on-surface);
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.menu-item.theme-option .material-symbols-outlined { color: var(--menu-item-unselected); }

/* HOVER */
.menu-item.theme-option:hover, .menu-action-btn:hover {
    background-color: var(--menu-bg-hover);
}
.menu-item.theme-option:hover .material-symbols-outlined { color: inherit; }

.menu-text { flex: 1; text-align: left; font-size: 0.9rem; }
.check-icon { font-size: 18px; color: var(--md-sys-color-primary); display: none; }

/* SELECCIONADO (ACTIVE) */
.theme-option.active, .menu-action-btn.active {
    background-color: var(--menu-item-bg-active) !important;
    color: var(--menu-item-text-active) !important;
}
.theme-option.active .material-symbols-outlined { color: inherit; }
.theme-option.active .check-icon { display: none; } /* Quitamos el check para que se vea limpio como tu imagen */

#static-content {
    margin-top: 20px;
}

#static-content .card-link-wrapper {
    color: var(--md-sys-color-on-surface) !important;
}

@media (max-width: 480px) { .brand .icon-logo { font-size: 28px; } .brand h1 { font-size: 20px; } }

@media (max-width: 400px) {
    .grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .card-text { font-size: 12px; }
}




/* ============ v61: estados de guardado, cruz de borrar, aviso flotante ============ */
:root { --md-sys-color-hover: rgba(255, 255, 255, 0.08); }
body.light-mode { --md-sys-color-hover: rgba(0, 0, 0, 0.08); }

/* Giro CSS (no depende de ningún icono de la fuente) */
.btn-spinner {
    width: 16px; height: 16px; flex: none;
    border: 2px solid currentColor; border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Botones de acción: ancho fijo para que no "salten" al cambiar el texto */
#btn-confirm-add, #btn-confirm-edit, #btn-confirm-pin { min-width: 148px; justify-content: center; }
.btn-filled.is-saving { opacity: 0.85; cursor: progress; }
.btn-filled.is-error { background: #d32f2f; color: #fff; animation: tooltip-shake 0.3s ease-in-out; }

/* Cruz de borrar */
.btn-delete { padding: 0; font-family: inherit; }
.btn-delete .btn-spinner { width: 14px; height: 14px; border-width: 2px; }
.btn-delete.is-busy { cursor: progress; }
.btn-delete.is-error { animation: tooltip-shake 0.3s ease-in-out; }
.card.deleting { opacity: 0.5; pointer-events: none; }
.card.deleting .btn-delete { pointer-events: none; }

/* Aviso flotante (popover: queda por encima de los diálogos modales) */
#toast {
    position: fixed; inset: auto auto 24px 50%; margin: 0; transform: translateX(-50%);
    max-width: 90vw; border: none; border-radius: 14px; padding: 10px 18px;
    background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary);
    font: 700 0.9rem 'Roboto', sans-serif; text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}
#toast.error { background: #d32f2f; color: #fff; }

/* --- ESTADO DE CONEXIÓN EN EL MENÚ --- */
.menu-status { padding: 0 16px 4px; font-size: 0.8rem; line-height: 1.4; color: var(--md-sys-color-on-surface); opacity: 0.8; }
.menu-status .menu-action-btn { padding: 8px 0; color: var(--md-sys-color-primary); }
.menu-action-btn:disabled { opacity: 0.45; cursor: default; }
.menu-action-btn:disabled:hover { background: transparent; }
