/* =========================
   PRIMARY BUTTON
========================= */

.btn-primary {
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.btn-primary:active {
    transform: translateY(-1px);
}

/* SPECIFIC BUTTONS */
#sendMasivo,
#sendUnificado,
#guardarNoticia,
#generateLetter {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    font-weight: 600;
    border: none;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
    width: 100%;
}

#sendMasivo:hover,
#sendUnificado:hover,
#guardarNoticia:hover,
#generateLetter:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

/* =========================
   FLOATING ACTION BUTTONS
========================= */

.fab {
    position: fixed;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(79, 140, 255, 0.98), rgba(37, 99, 235, 0.98));
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.28), 0 8px 18px rgba(79, 140, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
    z-index: 99;
}

.fab:hover {
    transform: translateY(-6px) scale(1.08);
    background: linear-gradient(135deg, rgba(119, 166, 255, 1), rgba(66, 123, 255, 1));
    box-shadow: 0 22px 40px rgba(15, 23, 42, 0.32), 0 12px 24px rgba(79, 140, 255, 0.24);
}

.fab:active {
    transform: translateY(-2px) scale(1.04);
}

/* POSICIONES */
.fab.ai      { bottom: 24px; right: 24px; }
.fab.notes   { bottom: 24px; right: 96px; }
.fab.news    { bottom: 24px; right: 168px; }
.fab.liq     { bottom: 24px; right: 240px; }
.fab.dictado { bottom: 24px; right: 312px; }

@media (max-width: 768px) {
    .fab { width: 52px; height: 52px; font-size: 18px; }

    .fab.ai      { bottom: 20px; right: 20px; }
    .fab.notes   { bottom: 20px; right: 84px; }
    .fab.news    { bottom: 20px; right: 148px; }
    .fab.liq     { bottom: 20px; right: 212px; }
    .fab.dictado { bottom: 20px; right: 276px; }
}

@media (max-width: 500px) {
    .fab { width: 48px; height: 48px; font-size: 16px; }

    .fab.ai      { bottom: 16px; right: 16px; }
    .fab.notes   { bottom: 16px; right: 72px; }
    .fab.news    { bottom: 72px; right: 16px; }
    .fab.liq     { bottom: 72px; right: 72px; }
    .fab.dictado { bottom: 128px; right: 16px; }
}

/* =========================
   PANEL BUTTONS
========================= */

.panel-body button {
    padding: 12px 16px;
    border: none;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.panel-body button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow), var(--shadow-glow);
}

.panel-body button:active {
    transform: translateY(0);
}

/* Cuotas y acciones — anular herencia de .panel-body button */
#addCuota,
#duplicarCuota {
    background: transparent;
    box-shadow: none;
}

#addCuota:hover,
#duplicarCuota:hover {
    background: var(--accent-glow);
    box-shadow: none;
    transform: none;
}

/* =========================
   CUOTA ACTIONS
========================= */

.acciones-cuotas {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

#addCuota,
#duplicarCuota {
    flex: 1;
    min-width: 140px;
    padding: 10px 12px;
    border: 1.5px dashed var(--border);
    border-radius: var(--radius);
    background: transparent;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

#addCuota:hover,
#duplicarCuota:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
    color: var(--accent);
}

#addCuota:active,
#duplicarCuota:active {
    transform: scale(0.98);
}

.deleteCuota {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--radius-sm);
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.deleteCuota:hover {
    background: var(--danger);
    color: white;
    transform: scale(1.05);
}

.deleteCuota:active {
    transform: scale(0.95);
}

/* =========================
   PLANTILLA ACCIONES
========================= */

.plantilla-acciones {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
}

.plantilla-acciones button {
    padding: 8px 14px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-copiar {
    background: var(--accent);
    color: white;
}

.btn-copiar:hover {
    background: var(--accent-light);
    transform: scale(1.05);
}

.btn-word {
    background: #2b579a;
    color: white;
}

.btn-word:hover {
    background: #365f91;
    transform: scale(1.05);
}

.btn-editar {
    background: var(--warning);
    color: white;
}

.btn-editar:hover {
    background: #fbbf24;
    transform: scale(1.05);
}

.btn-eliminar {
    background: var(--danger);
    color: white;
}

.btn-eliminar:hover {
    background: #f87171;
    transform: scale(1.05);
}

/* =========================
   PAGO ACTIONS
========================= */

.pago-actions {
    display: flex;
    gap: 8px;
}

.pago-actions button {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-view {
    background: var(--accent);
    color: white;
}

.btn-view:hover {
    background: var(--accent-dark);
}

.btn-delete {
    background: var(--danger);
    color: white;
}

.btn-delete:hover {
    background: #dc2626;
}

/* =========================
   FILE ITEM ACTIONS
========================= */

.file-item-actions {
    display: flex;
    gap: 8px;
}

.file-item-actions button {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-download {
    background: var(--accent);
    color: white;
}

.btn-download:hover {
    background: var(--accent-dark);
}

.btn-delete-file {
    background: var(--danger);
    color: white;
}

.btn-delete-file:hover {
    background: #dc2626;
}

/* =========================
   GESTIÓN BUTTONS
========================= */

.btn-primary,
.btn-secondary {
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    box-shadow: var(--shadow), var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-secondary {
    background: var(--card-soft);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--card-hover);
    border-color: var(--card-border);
}

/* =========================
   MIC RECORDING STATE
========================= */

.mic-btn.recording {
    background: var(--danger) !important;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.4); }
    50%  { transform: scale(1.04); box-shadow: 0 0 0 8px rgba(248, 113, 113, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(248, 113, 113, 0); }
}

/* =========================
   ESTADO DESHABILITADO GLOBAL
========================= */

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}
