/* ============================================
   BOTÓN UNIVERSAL DE ACCIONES RÁPIDAS
   ============================================ */

.quick-actions-container {
    position: relative;
    margin-left: 15px;
}

.btn-quick-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--accent, #e8b923), #f9d76c);
    color: #1a2e1a;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(232, 185, 35, 0.4);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-quick-actions:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 185, 35, 0.5);
}

.btn-quick-actions:active {
    transform: translateY(0);
}

.btn-quick-actions span:first-child {
    font-size: 18px;
}

/* Menú de Acciones Rápidas */
.quick-actions-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 420px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    overflow: hidden;
    animation: slideDown 0.25s ease;
}

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

.quick-actions-menu.hidden {
    display: none;
}

.quick-actions-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--primary, #1a5f3f), var(--secondary, #2d8a5e));
    color: white;
}

.quick-actions-header strong {
    display: block;
    font-size: 16px;
    margin-bottom: 4px;
}

.quick-actions-header span {
    font-size: 13px;
    opacity: 0.9;
}

.quick-actions-grid {
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.quick-action-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.quick-action-item:hover {
    background: white;
    border-color: var(--primary, #1a5f3f);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.quick-action-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.quick-action-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.quick-action-text strong {
    font-size: 13px;
    color: var(--dark, #1a2e1a);
}

.quick-action-text span {
    font-size: 11px;
    color: #888;
    line-height: 1.3;
}

/* Overlay para cerrar al hacer click fuera */
.quick-actions-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
}

/* Responsive */
@media (max-width: 768px) {
    .quick-actions-menu {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 20px 20px 0 0;
        max-height: 70vh;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
        max-height: calc(70vh - 80px);
    }
    
    .btn-quick-actions {
        padding: 10px 15px;
    }
    
    .btn-quick-actions span:last-child {
        display: none;
    }
}

/* Modo oscuro */
[data-theme="dark"] .quick-actions-menu {
    background: #16213e;
}

[data-theme="dark"] .quick-action-item {
    background: #0f3460;
}

[data-theme="dark"] .quick-action-item:hover {
    background: #1a1a2e;
    border-color: var(--secondary, #2d8a5e);
}

[data-theme="dark"] .quick-action-text strong {
    color: #eaeaea;
}

[data-theme="dark"] .quick-action-text span {
    color: #a0a0a0;
}

/* ============================================
   ANIMACIONES PARA OCR
   ============================================ */

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Estilos para preview de factura OCR */
#ocrPreview {
    animation: fadeIn 0.3s ease;
}

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

/* Inputs de solo lectura para gastos faena */
input[readonly] {
    cursor: not-allowed;
}

/* Estados del OCR */
.ocr-success {
    color: #4caf50;
    font-weight: 600;
}

.ocr-error {
    color: #f44336;
    font-weight: 600;
}

.ocr-processing {
    color: #ff9800;
    font-weight: 600;
}
