/*
 * Nenomed UI Kit — componentes visuales reutilizables de uso deliberado (prefijo nui-).
 * Nacido del rediseño del widget de Notas del dashboard; pensado para que cualquier otro
 * widget pueda adoptar el mismo lenguaje visual (icono circular con degradado, pills de
 * color, cards con sombra real, botones primario/ghost, cabecera/pie de modal) sin
 * duplicar CSS ni heredar nada por accidente -- solo se aplica donde se use la clase.
 *
 * Los colores de acento son genéricos (slate/blue/green/amber/red), no atados al
 * significado de negocio de ningún widget concreto (cada widget decide qué acento usa
 * para qué estado/categoría suya).
 *
 * INDICE
 * - Icono circular (nui-icon-circle + nui-accent-*)
 * - Card (nui-card + nui-top-*)
 * - Pill estática / badge (nui-pill + nui-pill-*)
 * - Pill seleccionable (nui-pill-select + nui-accent-border-*)
 * - Botones (nui-btn-icon, nui-btn-primary, nui-btn-pill-*)
 * - Inputs (nui-input, nui-textarea, nui-label)
 * - Chrome de modal (nui-modal-*)
 * - Fila de toggle (nui-toggle-row)
 * - Estado vacío (nui-empty-state + nui-empty-icon-*)
 * - Tabla (nui-table)
 */

/* ── Icono circular con degradado ────────────────────────────────────────── */
.nui-icon-circle {
    width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 15px; transition: background .2s, box-shadow .2s;
}
.nui-icon-circle-lg { width: 38px; height: 38px; font-size: 16px; }

/* ── Acentos de color (fondo degradado + sombra a juego) ─────────────────── */
.nui-accent-slate { background: linear-gradient(135deg, #94a3b8, #64748b); box-shadow: 0 3px 10px rgba(100,116,139,.3); }
.nui-accent-blue  { background: linear-gradient(135deg, #2980b9, #1b6ca8); box-shadow: 0 3px 10px rgba(41,128,185,.35); }
.nui-accent-green { background: linear-gradient(135deg, #27ae60, #1e8a4e); box-shadow: 0 3px 10px rgba(39,174,96,.35); }
.nui-accent-amber { background: linear-gradient(135deg, #f5a623, #e8841a); box-shadow: 0 3px 10px rgba(232,132,26,.35); }
.nui-accent-red   { background: linear-gradient(135deg, #e74c3c, #c0392b); box-shadow: 0 3px 10px rgba(231,76,60,.35); }

/* ── Card premium (fondo blanco, sombra real, barra de color superior) ───── */
.nui-card {
    position: relative; border-radius: 14px; padding: 13px 15px; cursor: pointer;
    background: #fff; border: 1px solid #f1f5f9;
    box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 1px 6px rgba(15,23,42,.05);
    transition: transform .15s, box-shadow .15s, border-color .15s;
}
.nui-card:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(15,23,42,.1); }
.nui-card::before {
    content: ''; position: absolute; top: 0; left: 14px; right: 14px; height: 3px;
    border-radius: 0 0 4px 4px; background: #cbd5e1;
}
.nui-card.nui-top-slate::before { background: #94a3b8; }
.nui-card.nui-top-blue::before  { background: #2980b9; }
.nui-card.nui-top-green::before { background: #27ae60; }
.nui-card.nui-top-amber::before { background: #f5a623; }
.nui-card.nui-top-red::before   { background: #e74c3c; }

/* ── Pill estática (badge de categoría/estado en una card) ────────────────── */
.nui-pill {
    display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .03em; padding: 3px 10px 3px 8px; border-radius: 20px;
    background: #f1f5f9; color: #64748b;
}
.nui-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.nui-pill-slate { background: #f1f5f9; color: #475569; }
.nui-pill-blue  { background: #e3f1fb; color: #1b6ca8; }
.nui-pill-green { background: #e4f8ed; color: #1e8a4e; }
.nui-pill-amber { background: #fef2dc; color: #9a6400; }
.nui-pill-red   { background: #fde8e6; color: #c0392b; }

/* ── Pill seleccionable (selector de categoría en un formulario/modal) ───── */
.nui-pill-select {
    display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700;
    padding: 6px 14px; border-radius: 20px; cursor: pointer; background: #f1f5f9; color: #64748b;
    border: 1.5px solid transparent; transition: all .15s;
}
.nui-pill-select:hover { background: #e2e8f0; }
.nui-pill-select .nui-dot { opacity: .55; }
.nui-pill-select-active { box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.nui-pill-select-active .nui-dot { opacity: 1; }
.nui-pill-select-active.nui-accent-border-slate { background: #e2e8f0; color: #334155; border-color: #94a3b8; }
.nui-pill-select-active.nui-accent-border-blue  { background: #e3f1fb; color: #1b6ca8; border-color: #2980b9; }
.nui-pill-select-active.nui-accent-border-green { background: #e4f8ed; color: #1e8a4e; border-color: #27ae60; }
.nui-pill-select-active.nui-accent-border-amber { background: #fef2dc; color: #9a6400; border-color: #f5a623; }
.nui-pill-select-active.nui-accent-border-red   { background: #fde8e6; color: #c0392b; border-color: #e74c3c; }

/* ── Botones circulares de icono / primario de acción rápida ─────────────── */
.nui-btn-icon, .nui-btn-primary {
    width: 30px; height: 30px; padding: 0; border: none; border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center; font-size: 12.5px;
    cursor: pointer; transition: all .15s;
}
.nui-btn-icon { background: #f1f5f9; color: #7a8a9a; }
.nui-btn-icon:hover { background: #e2e8f0; color: #475569; }
.nui-btn-primary { background: linear-gradient(135deg, #25d366, #1fb959); color: #fff; box-shadow: 0 3px 10px rgba(37,211,102,.35); }
.nui-btn-primary:hover { filter: brightness(1.06); box-shadow: 0 4px 14px rgba(37,211,102,.45); }
.nui-btn-primary:active, .nui-btn-icon:active { transform: scale(.93); }

/* ── Botones de pie (pill, con texto) ─────────────────────────────────────── */
.nui-btn-pill {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: none; border-radius: 20px;
    padding: 0 20px; height: 36px; font-size: 13px; font-weight: 700; cursor: pointer; transition: all .15s; min-width: 92px;
}
.nui-btn-pill:active { transform: scale(.96); }
.nui-btn-pill-ghost { background: #f1f5f9; color: #475569; }
.nui-btn-pill-ghost:hover { background: #e2e8f0; }
.nui-btn-pill-primary { background: linear-gradient(135deg, #25d366, #1fb959); color: #fff; box-shadow: 0 3px 10px rgba(37,211,102,.35); }
.nui-btn-pill-primary:hover { filter: brightness(1.05); box-shadow: 0 4px 14px rgba(37,211,102,.45); }
.nui-btn-pill-primary[disabled] { opacity: .55; cursor: not-allowed; box-shadow: none; }

/* ── Inputs ────────────────────────────────────────────────────────────── */
.nui-label { display: block; font-size: 11.5px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 7px; }
.nui-input, .nui-textarea {
    width: 100%; border: 1.5px solid #e2e8f0; border-radius: 10px; padding: 10px 13px;
    font-size: 13.5px; color: #1e293b; transition: border-color .15s, box-shadow .15s; outline: none; resize: none;
    font-family: inherit;
}
.nui-input:focus, .nui-textarea:focus { border-color: #2980b9; box-shadow: 0 0 0 3px rgba(41,128,185,.12); }
.nui-textarea { line-height: 1.5; }

/* ── Chrome de modal (cabecera/cuerpo/pie propios, sin el genérico de Bootstrap) ── */
.nui-modal-wrap { border-radius: 14px; overflow: hidden; }
.nui-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid #f1f5f9; }
.nui-modal-header-left { display: flex; align-items: center; gap: 12px; }
.nui-modal-title { margin: 0; font-size: 16px; font-weight: 700; color: #1e293b; }
.nui-modal-close {
    width: 30px; height: 30px; border-radius: 9px; border: none; background: #f1f5f9; color: #94a3b8;
    display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all .15s;
}
.nui-modal-close:hover { background: #e2e8f0; color: #475569; }
.nui-modal-body { padding: 20px; }
.nui-modal-footer { border-top: 1px solid #f1f5f9; padding: 14px 20px; display: flex; justify-content: flex-end; gap: 10px; }

/* ── Fila de ajuste con toggle (p.ej. "privado") ──────────────────────────── */
.nui-toggle-row {
    display: flex; align-items: center; justify-content: space-between; margin-top: 18px;
    padding: 12px 14px; background: #f8fafc; border-radius: 10px;
}
.nui-toggle-title { font-size: 12.5px; font-weight: 700; color: #334155; }
.nui-toggle-sub { font-size: 11px; color: #94a3b8; margin-top: 1px; }

/* ── Estado vacío (icono discreto + texto + CTA opcional, sin llamar demasiado la atención) ─── */
.nui-empty-state { text-align: center; padding: 22px 20px; }
.nui-empty-icon {
    width: 34px; height: 34px; border-radius: 50%; margin: 0 auto 10px;
    display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.nui-empty-title { font-size: 12.5px; font-weight: 700; color: #64748b; margin-bottom: 3px; }
.nui-empty-sub { font-size: 11.5px; color: #94a3b8; margin-bottom: 12px; line-height: 1.5; max-width: 320px; margin-left: auto; margin-right: auto; }

/* Fondo pastel + icono de color (no el degradado sólido de nui-icon-circle -- aquí
   queremos algo más suave, de "nada que ver todavía", no una acción llamativa). */
.nui-empty-icon-slate { background: #f1f5f9; color: #94a3b8; }
.nui-empty-icon-blue  { background: #e3f1fb; color: #2980b9; }
.nui-empty-icon-green { background: #e4f8ed; color: #27ae60; }
.nui-empty-icon-amber { background: #fef2dc; color: #f5a623; }
.nui-empty-icon-red   { background: #fde8e6; color: #e74c3c; }

/* ── Tabla (cabecera discreta tipo listado; usar sobre <table>, no sustituye a table-striped/hover) ── */
.nui-table thead th {
    color: #64748b; font-weight: 700; font-size: 11px; text-transform: uppercase;
    letter-spacing: .03em; border-bottom: 2px solid #eef1f5 !important; white-space: nowrap;
}
.nui-table tbody > tr > td { vertical-align: middle; }
